WayScience / coSMicQC

Single cell Morphology Quality Control (coSMicQC)
https://wayscience.github.io/coSMicQC/
BSD 3-Clause "New" or "Revised" License
5 stars 2 forks source link

Add CLI for `coSMicQC` #34

Closed d33bs closed 3 months ago

d33bs commented 3 months ago

Description

This PR adds a CLI for coSMicQC through the use of fire. This work depends on changes from #32 . Along the journey towards these changes I discovered there were challenges in displaying pd.DataFrame's (or related SCDataFrame's) through fire CLI's. As a result, I added a patch inspired from work in https://github.com/google/python-fire/pull/446 by reassigning the _PrintResult function to match the contents of the fix. Once the fix is merged in fire we should remove the patch and rely on fire for these changes. When/if these changes are merged, I'll create an issue to track this so we don't forget to take action here.

Along with these changes some docs were fixed.

This should be reviewed and merged after #32

Closes #14 Closes #37

What kind of change(s) are included?

Checklist

Please ensure that all boxes are checked before indicating that this pull request is ready for review.

d33bs commented 3 months ago

In chatting with @jenna-tomkinson, we discussed that getting a file-based output would potentially be more useful than text-based output. The filename could use the input filename as the basis for output filename, for example example.csv would become example.identify_outliers.parquet

d33bs commented 3 months ago

Thinking on file-based output a little more made me feel that that work might be best served after merging #32 and this PR. Generally, I'm worried that there may be complex scenarios where one would want a file vs not. It also might be possible to control the export of files through a similar mechanism to pd.DataFrame, i.e. pd.DataFrame.to_parquet(...), etc. which could avoid us having to maintain additional code. Created #37 as a result.

Decided to implement this within the same PR.

d33bs commented 3 months ago

Thanks @jenna-tomkinson for the review! I've addressed your comments and will now merge this in.