-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add depends_on path to error output #248
Changes from 2 commits
ec76a44
0b1a641
f289624
4bf1a4a
7741c1e
a3bb2c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -280,7 +280,8 @@ def parse_depends_on_chain( | |||||||||||||||||||
chain.transformations[transform.name] = transform[()] | ||||||||||||||||||||
except KeyError as e: | ||||||||||||||||||||
warnings.warn( | ||||||||||||||||||||
UserWarning(f'depends_on chain references missing node {e}'), stacklevel=2 | ||||||||||||||||||||
UserWarning(f'depends_on chain {depends_on} references missing node {e}'), | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The CI is complaining as the tests at scippnexus/tests/nxtransformations_test.py Lines 727 to 735 in 7878e8a
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I ran it locally like so There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace the match with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done, let's see if it works |
||||||||||||||||||||
stacklevel=2, | ||||||||||||||||||||
) | ||||||||||||||||||||
return None | ||||||||||||||||||||
return chain | ||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No sure what this adds? I think the depends_on was already in the warning message as
e
?Old error message:
UserWarning: depends_on chain references missing node 'transform'
New error message:
UserWarning: depends_on chain transform references missing node 'transform'
The
KeyError
is just the name of the missing entry.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's a lucky example, what I'm interested in is which node is causing the problem, and I get a message like so:
WARNING root:fileloading_test.py:31 UserWarning: depends_on chain /entry/instrument/detector_panel_2/transformations/stageZ references missing node 'depends_on'
Run against
443503_00032754.hdf