Skip to content
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

DM-27500: add a comment in butler & pipetask subcommand about more options in butler --help #98

Merged
merged 1 commit into from Nov 18, 2020

Conversation

n8pease
Copy link
Contributor

@n8pease n8pease commented Nov 17, 2020

PipetaskCommand class allows pipetask-specific overrides of
subcommand behaviors.
This adds a comment to the end of every subcommand's help text,
that more options are available using "pipetask --help"

Removes the --log-level option from subcommands.

There was other help text in the epilog that was specific to
prototype development of chained subcommands, and should have
been removed when we did not use that feature. It is now
removed.

@@ -137,3 +138,20 @@ def makePipelineActions(args,
elif args[i] in instrumentFlags:
pipelineActions.append(_ACTION_ADD_INSTRUMENT(args[i+1]))
return pipelineActions


class PipetaskCommand(MWCommand):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that the only difference between PipetaskCommand and ButlerCommand is the one string, could we set up ButlerCommand with an epilog attribute that says "See butler --help..." and then for PipetaskCommand it's a subclass of ButlerCommand that consists of a single override of the {{epilog}} value? That will stop us duplicating all the code here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was worried about getting too cute trying to make them the same, but your suggestion seems like a good compromise, will do.

PipetaskCommand class allows pipetask-specific overrides of
subcommand behaviors.
This adds a comment to the end of every subcommand's help text,
that more options are available using "pipetask --help"

Removes the --log-level option from subcommands.

There was other help text in the epilog that was specific to
prototype development of chained subcommands, and should have
been removed when we did not use that feature. It is now
removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants