clamsproject / clams-python

CLAMS SDK for python
http://sdk.clams.ai/
Apache License 2.0
4 stars 1 forks source link

adding `cli.py` for command line app use #217

Closed MrSqually closed 3 weeks ago

MrSqually commented 2 months ago

This PR addresses #198 , by adding a "cli.py" template to the clams SDK. This script iterates over the "parameters" in a new app's metadata and parses them into argparse arguments. From here, it collects those arguments and stdin, runs app._annotate() , and produces the result to stdout

Review

Generally, I think the areas that I'm least sure about:

codecov[bot] commented 4 weeks ago

Codecov Report

Attention: Patch coverage is 26.53061% with 36 lines in your changes missing coverage. Please review.

Project coverage is 72.65%. Comparing base (392b4c8) to head (75a5be5).

Files Patch % Lines
clams/develop/__init__.py 12.82% 34 Missing :warning:
clams/mmif_utils/rewind.py 50.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #217 +/- ## =========================================== - Coverage 73.94% 72.65% -1.29% =========================================== Files 9 9 Lines 756 779 +23 =========================================== + Hits 559 566 +7 - Misses 197 213 +16 ``` | [Flag](https://app.codecov.io/gh/clamsproject/clams-python/pull/217/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=clamsproject) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/clamsproject/clams-python/pull/217/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=clamsproject) | `72.65% <26.53%> (-1.29%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=clamsproject#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

keighrim commented 4 weeks ago

requesting review from @marcverhagen . Particularly regarding the documentation at https://github.com/clamsproject/clams-python/blob/a8ae2afc1e589976cf837f108ae85f60999092fe/documentation/clamsapp.md#using-clams-app-as-a-cli-program