ome / omero-cli-zarr

https://pypi.org/project/omero-cli-zarr/
GNU General Public License v2.0
16 stars 10 forks source link

Also define --output option at the subcommand parser for usability #92

Closed sbesson closed 2 years ago

sbesson commented 3 years ago

Addresses some usability feedback reported @pwalczysko and @dominikl. The --output argument is currently defined at the level of the zarr command parser making it hard to discover via the command help or remember.

4a04e23 proposes to specify the argument explicitly for each command. From the usage perspective, this means

omero zarr export --help

should also list the --output OUTPUT argument. In terms of functional testing, the following command should work

omero zarr export Image:1 --output /tmp 

The previous behavior is conserved so that existing usage does not break i.e.

omero zarr --output /tmp export Image:1

In the unlikely case where --output is specified twice, local testing suggests the last specified option takes precedence

pwalczysko commented 2 years ago

When trying to test this, I am having a problem with pip installing from this branch.

(test-seb) pwalczysko@ls31618~/Work/omero-cli-zarr$ git branch
* (HEAD detached at seb/output_option)
pip install -e .
Obtaining file:///Users/pwalczysko/Work/omero-cli-zarr
Requirement already satisfied: omero-py>=5.6.0 in /Users/pwalczysko/miniconda3/envs/test-seb/lib/python3.9/site-packages (from omero-cli-zarr==0.2.1.dev2+g4a04e23) (5.10.0)
ERROR: Could not find a version that satisfies the requirement ome-zarr>=0.2.1.dev0 (from omero-cli-zarr) (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9.dev0, 0.0.10, 0.0.11, 0.0.12, 0.0.13, 0.0.14, 0.0.15, 0.0.16, 0.0.17, 0.0.18, 0.0.19, 0.0.20, 0.0.21, 0.0.22, 0.0.23, 0.1.0, 0.1.1, 0.2.0)
ERROR: No matching distribution found for ome-zarr>=0.2.1.dev0
sbesson commented 2 years ago

Thanks @pwalczysko, it looks like the bump2version commit https://github.com/ome/omero-cli-zarr/commit/87bd4d098159434a2e27b9c8792b86c4703b73c8 bumped all 0.2.0 versions including the one in the dependency block to .dev0.

This is reverted in 4af9535 but 1- I don't know if there is a way to restrict the lines updated in setup.py by the bump2version tool, 2- this certainly points towards the lack of a minimal CI testing as this error should have been caught as soon as the tool is installed.

pwalczysko commented 2 years ago

All works as described now.

ocal testing suggests the last specified option takes precedence

Yes, confirming that too.