Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for next scipp #169

Merged
merged 6 commits into from
Nov 2, 2023
Merged

Update for next scipp #169

merged 6 commits into from
Nov 2, 2023

Conversation

jl-wynen
Copy link
Member

No description provided.

@@ -216,7 +216,7 @@ def test_auxiliary_signal_causes_load_as_dataset(h5root):
snx.create_field(data, 'signal', da.data)
snx.create_field(data, 'xx', da.coords['xx'])
data = snx.Group(data, definitions=snx.base_definitions())
assert_identical(data[...], sc.Dataset({'signal': da.data, 'xx': da.coords['xx']}))
assert_identical(data[...], sc.DataGroup(signal=da.data, xx=da.coords['xx']))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly not sure what happened here. But in my local build, data[...] returns a datagroup. But not in CI.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know if NeXus guarantees that aux signals have the same number of dims, so maybe we have to consider moving to DataGroup anyway?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this happens anyway which is why I had to fix the test. But I don't know what triggers it. I didn't change the implementation of Group

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably means that there is an exception somewhere, so it falls back to loading as a datagroup. This likely indicates your broke something elsewhere. Do not change this test!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs to change because signal and xx have different shapes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the standard, I see now that the aux-signals are suppose to have the same shape as the original. That is, the existing test was a bit bad. Therefore:

  • Change the shape of the aux signal stored in this test.
  • Keep checking for Dataset.

ds['face1_center'] = vertices[face1_center.values]
ds['face1_edge'] = vertices[face1_edge.values]
ds['face2_center'] = vertices[face2_center.values]
ds = sc.Dataset(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also fix this in v1? It's showing up when using load_nexus.
I know it's deprecated but I still have to use it until we handle the transformation chains.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Unfortunately, there are no tests for v1. So I don't know for sure that it works.

@SimonHeybrock SimonHeybrock merged commit 0deb583 into main Nov 2, 2023
4 checks passed
@SimonHeybrock SimonHeybrock deleted the update-for-next-scipp branch November 2, 2023 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants