-
Notifications
You must be signed in to change notification settings - Fork 5
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 debug flag and architecture error message #80
Conversation
691fbf5
to
e8a291a
Compare
f"{exception}\n\nThis error originates from an architecture, and is likely " | ||
"not a problem with metatensor-models." |
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 feel this will make our users think they're dealing with a collection of models rather
than a piece of useful software (and therefore will not give us credit)
f"{exception}\n\nThis error originates from an architecture, and is likely " | |
"not a problem with metatensor-models." | |
f"{exception}\n\nThis error originates from an architecture. If you think this is " | |
"a bug, you can contact its maintainer (see the architecture's documentation)." |
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.
Yes this is a better. I will change it and also swap the order. First the we give the test and below state the error message.
tests/utils/test_errors.py
Outdated
|
||
|
||
def test_architecture_error(): | ||
with pytest.raises(ArchitectureError, match="not a problem with metatensor-models"): |
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.
with pytest.raises(ArchitectureError, match="not a problem with metatensor-models"): | |
with pytest.raises(ArchitectureError, match="you can contact its maintainer"): |
bad7d08
to
5a607ad
Compare
d0d718b
to
f48faab
Compare
f48faab
to
3e1e7cf
Compare
Can you take another final look @frostedoyster. I saw that a couple of tests are basically not testing the output of an error raise. sorry. |
Thanks a lot! |
This PR adds two usability features for the CLI
--debug
flag.📚 Documentation preview 📚: https://metatensor-models--80.org.readthedocs.build/en/80/