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-25385 make a pipetask command based on click #266
Conversation
@@ -38,7 +38,7 @@ def test_repoBasic(self): | |||
"""Test the most basic required arguments.""" | |||
self.run_test(["register-instrument", "here", "a.b.c"], | |||
self.makeExpected(repo="here", | |||
instrument=("a.b.c",))) | |||
instrument=["a.b.c"])) |
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.
Was this change required or you just preferred the list?
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.
this is because the split_commas util function was added as a callback to the instrument_option
. split_commas
returns a list. I wonder if it should return a tuple tho? It's a question of mutability vs immutability right?
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.
split_commas returning an immutable object is probably more correct given the usage scenario. You never expect someone to add more entries after they get it back. Sometimes in the implementation code that would require a copy so we tend not to do it.
if self.parameterType == ParameterType.ARGUMENT: | ||
f.__doc__ = addArgumentHelp(f.__doc__, self.help) | ||
return click.argument("instrument", | ||
required=self.required, |
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.
Were these reordered to be alphabetical?
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
637c6ac
to
2055979
Compare
620659a
to
59ecedb
Compare
tests the lsst.Log portion, which is loaded by butler only if another package as setup lsst.Log.
This test also runs in butler, but butler does not depend on lsst.log so in CI those parts of CliLog are not tested with daf_butler. Since obs_base does depend on lsst.log, running the test here is more complete.
59ecedb
to
f2a66bc
Compare
No description provided.