Closed ieivanov closed 1 year ago
Thanks for writing this @ieivanov.
I've changed my mind, and I now agree with your preference for signatures of the form:
mantis COMMAND -i INPUT_PATH -o OUTPUT_PATH --config CONFIG_PATH [OPTIONS]
This CLI style guide agrees: https://clig.dev/#arguments-and-flags "If you’ve got two or more arguments for different things, you’re probably doing something wrong."
I'm starting to chip away at this on WIP #75.
Here's my first pass at proposed calls. All comments are welcome.
# ACQUIRE
mantis run-acquisition -o ./ -n acq_name -c path/to/config.yaml
# CONVERT TO ZARR
iohub convert -i ./acq_name/acq_name_labelfree_1 -o ./acq_name_labelfree.zarr
iohub convert -i ./acq_name/acq_name_lightsheet_1 -o ./acq_name_lightsheet.zarr
# DESKEW
mantis estimate-deskew -i ./acq_name_lightsheet.zarr/0/0/0 -o ./deskew.yml
mantis deskew -i ./acq_name_lightsheet.zarr/*/*/* -c ./deskew_params.yml -o ./acq_name_lightsheet_deskewed.zarr
# UPCOMING CALLS AHEAD
# RECONSTRUCT
recorder reconstruct -i ./acq_name_labelfree.zarr/*/*/* -c ./recon.yml -o ./acq_name_labelfree_reconstructed.zarr
# REGISTER
mantis estimate-registration -ls ./acq_name_lightsheet_deskewed.zarr/0/0/0 -lf ./acq_name_labelfree_reconstructed.zarr/0/0/0 -o register.yml
mantis register -ls ./acq_name_lightsheet_deskewed.zarr -lf ./acq_name_lightsheet_deskewed.zarr -o ./acq_name_registerred.zarr
FYI @edyoshikun I found a way to let options take lists in click
(like -i ./input.zarr/*/*/*
)
Beautiful!
Minor omission - mantis register
should also require an output argument, correct?
Good eye! I fixed it in my comment above.
The CLI calls should have a standard signature, for example
or
We should make
-h
an alias for--help
on all commands. In my opinion, the input/output/config paths should not be optional, i.e. have default values - you should always know where your data is coming from or going to.I find the second example here more readable, but I also recognize that the first example is more of a standard practice. @edyoshikun @talonchandler @mattersoflight I welcome your input here.
Here are examples of our current CLI signatures: