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-25385 make a pipetask command based on click #266

Merged
merged 8 commits into from Jul 15, 2020
Merged

Conversation

n8pease
Copy link
Contributor

@n8pease n8pease commented Jun 21, 2020

No description provided.

@@ -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"]))
Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Member

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,
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

@n8pease n8pease force-pushed the tickets/DM-25385 branch 2 times, most recently from 637c6ac to 2055979 Compare July 2, 2020 20:36
@n8pease n8pease force-pushed the tickets/DM-25385 branch 3 times, most recently from 620659a to 59ecedb Compare July 14, 2020 17:38
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.
@n8pease n8pease merged commit 8c202bc into master Jul 15, 2020
@timj timj deleted the tickets/DM-25385 branch August 17, 2020 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants