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 #461

Merged
merged 14 commits into from
Nov 7, 2023
Merged

Update for next scipp #461

merged 14 commits into from
Nov 7, 2023

Conversation

jl-wynen
Copy link
Member

This won't build yet because it needs deprecated_attrs with has not been released.

@nvaytet nvaytet self-assigned this Oct 20, 2023
"""
if not p3:
raise _pythreejs_import_error

import plopp as pp

positions_var = scipp_obj.meta[positions]
try:
Copy link
Member

Choose a reason for hiding this comment

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

Is the try/except here for backward compatibility, for older versions of Scipp who do not have deprecated_meta? If so, does that mean we don't need to set the minimum scipp requirement to 23.08?

However, there are then places below that make use of deprecated_attrs that are not in a try/except block.
So they would need the version pin. We should either pin min scipp version 23.08 and use deprecated_attrs, or not pin and use try/except. Right now it seems there is a mix of both?

Unless I just completely misunderstood the motivation for the try/except?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is more about forward compatibility since it uses coords in the except. So when we fully remove attrs, this code will continue to work.

I was unsure if I should make all uses of attrs and meta backwards compatible. But I decided against it because it would introduce even more noise. So I'd rather go with a lower version limit.
Concerning forward compat, I can update frames.py to fall back to coords. But this makes no sense for load_nexus as that will be removed before attrs.

Copy link
Member

Choose a reason for hiding this comment

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

I can update frames.py to fall back to coords

👍

def _meta_or_fallback(x):
# This can be removed when attrs have been removed in the minimum scipp version.
try:
return x.deprectaed_meta
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return x.deprectaed_meta
return x.deprecated_meta

Copy link
Member Author

Choose a reason for hiding this comment

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

Should've run the tests locally.
Fixed this now. But found that the mantid and streamaing tests didn't run. Working on it...

@jl-wynen
Copy link
Member Author

The tutorials need some work. I may have to rewrite a significant part of 'exploring data' to use data groups.

@jl-wynen jl-wynen mentioned this pull request Oct 23, 2023
@jl-wynen
Copy link
Member Author

Now also fixes #462

@jl-wynen jl-wynen linked an issue Oct 23, 2023 that may be closed by this pull request
@jl-wynen
Copy link
Member Author

I'm waiting until the scipp release before merging.

@jl-wynen
Copy link
Member Author

jl-wynen commented Nov 3, 2023

I changed it to always fall back it deprecated_(attrs|meta) is not available. This should not work with scipp 23.07 and 23.08+

# Conflicts:
#	.buildconfig/ci-linux.yml
#	.buildconfig/ci-macos.yml
#	.buildconfig/ci-windows.yml
#	.github/workflows/pr_and_main.yml
@nvaytet
Copy link
Member

nvaytet commented Nov 3, 2023

This should not work with scipp 23.07 and 23.08+

Did you mean "not work" or "now work"?

@jl-wynen
Copy link
Member Author

jl-wynen commented Nov 3, 2023

This should not work with scipp 23.07 and 23.08+

Did you mean "not work" or "now work"?

I meant 'now'

@jl-wynen jl-wynen merged commit fc6081b into main Nov 7, 2023
5 checks passed
@jl-wynen jl-wynen deleted the update-for-next-scipp branch November 7, 2023 08:34
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.

Update mantid to 6.8
2 participants