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

Improve and simplify loading of transformation chains #243

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

SimonHeybrock
Copy link
Member

@SimonHeybrock SimonHeybrock commented Sep 27, 2024

See docstring in nxtransformations.py for an explanation.

I have added class DependsOn which seems a much saner way to handle the references, instead of juggling absolute and relative paths. The subclass TransformationChain additionally hold the chain of transformations starting at the depends_on.

Fixes #234 by introducing a new mechanism that can work around the shortcomings of the default data load. See there also for larger context.

Technically this represents a breaking change, since users would have to call build() after loading groups with transformations. In practice this is however typically not accessed directly — users typically use snx.compute_positions instead of working with the raw chains.

@SimonHeybrock SimonHeybrock changed the title Add transformations module Improve and simplify loading of transformation chains Sep 30, 2024
src/scippnexus/base.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Selected
Development

Successfully merging this pull request may close these issues.

Representation of loaded transformations?
1 participant