Closed aimalz closed 1 year ago
Chatting with Alex today, what I would actually recommend is building up a compound rail
command line tool that lets you do things like :
rail install --conda-name rail-py3.10 --conda-reqs conda_reqs.txt --python-version=3.10
rail source-install --install-dir .. --conda-name rail-py3.10 --conda-reqs conda_reqs.txt --python-version=3.10
rail run BPZ_Lite --input <some_file> --model <some_file> --j 12 --config <some_file> --output <some_file>
rail run BPZ_Lite --help # prints the configuration parameters, input and outputs for BPZ_Like
rail run pipeline.yml --input <some_file> --outdir . # runs a pipeline
rail list-stages
rail list-packages
rail render-nb
rail clean-nb
If you have a favorite way to build up command line tools, go for it. If not, have a look here:
https://github.com/lsst-dm/cm_tools/tree/main/src/lsst/cm/tools/cli
All of the parameters available to any one of the subcommands are defined in options.py, the actual subcommands are defined in commands.py, note that most of them just grab stuff from the kwargs (which are parsed out from the command line) and pass them along to other functions. Happy to sit with you and explain it if that is helpful.
closed with #30
When installing from source, we discussed looking into options for installing each standalone RAIL ecosystem package sequentially such that the whole installation wouldn't fail if one of them breaks, given that the code already makes use of introspection to accommodate if only some creators/estimators are installed. (Also I think the setup.py is defunct now that we have pyproject.toml, yes?)