-
Notifications
You must be signed in to change notification settings - Fork 36
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 more descriptive error if sp and id are not provided #915
Conversation
Codecov Report
@@ Coverage Diff @@
## main #915 +/- ##
=======================================
Coverage 86.64% 86.65%
=======================================
Files 41 41
Lines 4575 4577 +2
Branches 996 997 +1
=======================================
+ Hits 3964 3966 +2
Misses 431 431
Partials 180 180
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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 am in favor of improving this error message, but I am not sure if id_none = id is None
is something I understand that well. I would rather see the None checks directly then aliasing them like that personally. I could be easily persuaded (other examples of us doing this in the codebase? Is this the pythonic way?).
I defined the variables |
It is very unlikely that this will improve performance, in my estimation. |
@cbkerr @mikemhenry I'm happy with the changes I just pushed. If you're happy with it, feel free to approve/merge. |
Description
Adds a better error messgae for calling
project.open_job()
.Motivation and Context
Before, it would tell you something that implied you provided both statepoint and id: "Either statepoint or id must be provided, but not both."
I was working on something for dashboard and this more descriptive message would have saved me a little time.
Checklist: