czbiohub-sf / shrimPy

shrimPy: Smart High-throughput Robust Imaging & Measurement in Python
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

Standardize CLI #75

Closed talonchandler closed 1 year ago

talonchandler commented 1 year ago

Fixes #56 and #65.

This PR standardizes and simplifies the CLI:

ieivanov commented 1 year ago

A related issue that may be fixed here - I am finding that mantis run-acquisition --help takes ~15 seconds to return. Is that normal? Are we importing any large libraries at the top of the CLI call stack?

talonchandler commented 1 year ago

mantis run-acquisition --help takes ~15 seconds to return

~I couldn't find a simple solution, so I'm going to open a new issue and show some profiling results.~

I take it back...I found that run_acquisition was the slowest. Moving the imports inside the function made mantis run-acquisition -h run in ~1.5 seconds compared to the earlier ~5 seconds on my machine.

The other CLI calls take ~1.5.

ieivanov commented 1 year ago

Thanks for your work on this @talonchandler! @edyoshikun or @ziw-liu can we get one more review before merging this?

I changed the signature of run_acquisition as we discussed above and updated the readme. Otherwise, mostly minor changes.

edyoshikun commented 1 year ago

what's the best way to merge these changes to #55? There were some parsing.py changes there that probably have conflicts with this PR.

talonchandler commented 1 year ago

Thanks for the improvements, @ieivanov.

@edyoshikun I'll merge this to main then into #55. I'll handle the merge conflicts.