Skip to content

Conversation

@nvaytet
Copy link
Member

@nvaytet nvaytet commented Mar 3, 2025

Suppress new warnings that have appeard from scippnexus update.

@nvaytet nvaytet requested a review from jokasimr March 3, 2025 13:50
pyproject.toml Outdated
'ignore:\n.*Sentinel is not a public part of the traitlets API.*:DeprecationWarning',
"ignore:.*metadata to be logged in the data array, it is necessary to install the orsopy package.:UserWarning",
"ignore:.*A transformation needs a vector attribute. Falling back to returning underlying value.:UserWarning",
"ignore:Invalid transformation.*'vector':UserWarning",
Copy link
Member

Choose a reason for hiding this comment

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

Is this only for Amor files? If so, can you disable the warning only for those tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, good point. Can you remind me how we do that?

Copy link
Member

Choose a reason for hiding this comment

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

This is in the integration testing repo:

# The files used in the AMOR ESTIA reduction workflow have some scippneutron warnings
pytestmark = pytest.mark.filterwarnings(
    "ignore:.*Invalid transformation, missing attribute 'vector':UserWarning",
)

You can put this into a *_test.py file or if there are multiple, into the Amor conftest.py file.

@nvaytet nvaytet merged commit cfbbe81 into main Mar 3, 2025
4 checks passed
@nvaytet nvaytet deleted the fix-scippnexus-warning branch March 3, 2025 14:35
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