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
Scottx611x/configurable branch for vis tool registry #2942
Scottx611x/configurable branch for vis tool registry #2942
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2942 +/- ##
===========================================
- Coverage 60.67% 59.25% -1.43%
===========================================
Files 433 433
Lines 28103 27107 -996
Branches 1274 1274
===========================================
- Hits 17051 16061 -990
+ Misses 11052 11046 -6
Continue to review full report at Codecov.
|
raise CommandError("`--branch` requires `--visualizations` to be " | ||
"specified") | ||
if options["branch"]: | ||
self.visualization_registry_branch = options["branch"] |
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 would do less procedural validation and use more of what argparse provides, like argument_group and mutually_exclusive_group.
refinery/tool_manager/tests.py
Outdated
def test_load_tools_command_error_if_branch_and_workflows_specified(self): | ||
with self.assertRaises(CommandError): | ||
call_command("load_tools", workflows=True, | ||
branch="fake-branch-name") |
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.
And in a similar vein, if we were using more of the built-in machinery, I don't think we'd need explicit checks on their error handling.
action='store', | ||
dest='branch', | ||
help='Branch from the registry to target for Vis tool installation' | ||
) |
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.
Maybe make the "master" default explicit here, rather than the init? The help text will be more explicit, and you can get rid of one if
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.
There's a lot of functionality that comes with argparse that could be used here. Not blocking a merge, but if you wouldn't mind me tweaking this PR, I could do that...
…own error handling
…rable_branch_for_vis_tool_registry
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 mutually exclusive options at the top level, subparsers might be useful. I haven't actually used them before, but if it's ok with you I'll check out this branch and and try doing it that way.
@mccalluc sounds good to me! |
@mccalluc
./manage.py load_tools --visualizations multiqc heatmap-scatterplot --branch new_tool_versions