Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: daf_butler, obs_base
-
Story Points:8
-
Epic Link:
-
Sprint:DB_S20_02
-
Team:Data Access and Database
-
Urgent?:No
Description
Make the butler command in daf_butler able to call the register command in obs_base (at python/lsst/obs/base/instrument.py).
To do this, when obs_base is setup, it should add a colon separated list of CLI python code modules or functions. For example set it to lsst.obs.base.cli.
Then in butler command itself do something like:
for module in os.environ["DAF_BUTLER_PLUGINS"].split(":"): |
blah = doImport(cls)
|
and maybe have the imported class import the subcommands to click somehow
...it may help to be explicit and have the env var contain the actual command function (so lsst.obs.base.cli.register or somesuch).
Attachments
Issue Links
- relates to
-
DM-21898 Create command-line tools for Gen3 repo administration
- Won't Fix
I was thinking that it would not be a path but would be a colon separated list of CLI python code modules or functions. So for example set it to lsst.obs.base.cli (since we would have the code in the python path).
Then in butler command itself you do something like:
and maybe have the imported class import the subcommands to click somehow (I don't know what the equivalent of from x import * would be or how importing code registers with click.
Maybe it helps to be explicit and have the env var contain the actual command function (so lsst.obs.base.cli.register or somesuch).