-
Notifications
You must be signed in to change notification settings - Fork 128
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
Move AugurError to new errors.py, replace RuntimeError #921
Conversation
Cyclic dependency between |
Codecov Report
@@ Coverage Diff @@
## master #921 +/- ##
==========================================
+ Coverage 59.34% 59.36% +0.02%
==========================================
Files 42 43 +1
Lines 6011 6014 +3
Branches 1539 1539
==========================================
+ Hits 3567 3570 +3
Misses 2185 2185
Partials 259 259
Continue to review full report at Codecov.
|
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.
Thanks, @victorlin! What if we placed AugurError
in a new errors.py
or exceptions.py
top-level module in augur
(sort of like pandas does, only simpler)? This organization should address this and future circular import issues. I also prefer from .errors import AugurError
over from .utils import AugurError
for readability.
Would you rather keep or drop 7a72c25? I'm fine with either. |
2af1045
to
b4edf53
Compare
@victorlin I'd probably drop that change for now. Seeing all of those imports at the top should be a good reminder for us to move the util support logic back into utils at some point... :) |
3ddbd46
to
6ed70a5
Compare
This reduces complexity and chance of circular imports in utils.
6ed70a5
to
2ad9b2b
Compare
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.
LGTM by inspection. Using a separate "errors" module is also what I'd done for nextstrain.cli.errors
, as exception classes are used/imported so widely it's good not to have them wrapped up with other stuff.
Description of proposed changes
See commit messages.
Related issue(s)
Suggested by @tsibley: #918 (review)
Testing
Tests modified accordingly.