Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding cli.py for command line app use #217

Merged
merged 11 commits into from
Jun 6, 2024
Merged

adding cli.py for command line app use #217

merged 11 commits into from
Jun 6, 2024

Conversation

MrSqually
Copy link
Contributor

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:

  • Safer / more idiomatic access to stdin / stdout
  • I didn't add the template to any scripts, if that's something needed

Copy link
Member

@keighrim keighrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some in-line comments. Also, for commit logs don't seem to be very informative anyway. If the commits are small, incremental changes, how about squash them during we're working in the PR, before merge the history into the main?

clams/develop/templates/app/cli.py.template Outdated Show resolved Hide resolved
clams/develop/templates/app/cli.py.template Outdated Show resolved Hide resolved
clams/develop/templates/app/cli.py.template Outdated Show resolved Hide resolved
clams/develop/templates/app/app.py.template Outdated Show resolved Hide resolved
@keighrim keighrim changed the title 198 cli interface adding cli.py for command line app use May 4, 2024
Copy link

codecov bot commented Jun 2, 2024

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 ⚠️
clams/mmif_utils/rewind.py 50.00% 2 Missing ⚠️
Additional details and impacted files
@@             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 Coverage Δ
unittests 72.65% <26.53%> (-1.29%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@keighrim
Copy link
Member

keighrim commented Jun 2, 2024

@keighrim keighrim merged commit e64629b into develop Jun 6, 2024
1 of 3 checks passed
@keighrim keighrim deleted the 198-cli-interface branch June 6, 2024 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants