-
Notifications
You must be signed in to change notification settings - Fork 37
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
Dispatches dependency #222
Dispatches dependency #222
Conversation
except ModuleNotFoundError as mnferr: | ||
raise IOError('DISPATCHES has not been found in current conda environment.' + | ||
'Please re-install the conda environment from RAVEN using the ' + | ||
'--optional flag.') from mnferr |
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 haven't seen this from
keyword before in relation to handling exceptions? It looks cool, what is it doing?
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.
Is that the printouts with "while processing this error, another error occurred" or whatever? I like that a lot.
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, py-lint recommended it from PEP 3134. It enables exception-chaining, re-raising the first exception and noting if the second exception is directly caused or happens during the error processing ("The above exception was the direct cause of the following exception:" versus "During handling of the above exception, another exception occurred:")
There's an issue that Joshua has been looking at that causes us to fail with dill version 0.3.6. If you want to pin the version at 0.3.5 for this PR, that's fine and the tests have a shot of passing. |
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.
Changes are good and provide good user messages.
reverted dill version 0.3.5 temporarily until the larger issue can be fixed. |
Pull Request Description
What issue does this change request address?
#221
What are the significant changes in functionality due to this change request?
DISPATCHES is now an optional dependency. It will only be installed in the conda environment if requested (with the --optional flag). No changes to other standard or MOPED workflows. If DISPATCHES workflow is attempted from an XML input, an error will alert the user to install DISPATCHES through the optional installation.
For Change Control Board: Change Request Review
The following review must be completed by an authorized member of the Change Control Board.