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

Add nwis_client CLI #185

Merged
merged 18 commits into from Mar 17, 2022
Merged

Add nwis_client CLI #185

merged 18 commits into from Mar 17, 2022

Conversation

jarq6c
Copy link
Collaborator

@jarq6c jarq6c commented Mar 7, 2022

This PR adds a minimal command-line interface to the nwis_client subpackage. The CLI entry point is called nwis-client. The nwis_client README includes examples of use. Currently the tool generates a CSV based on an arbitrary number of USGS site codes (see usage/help output in README). It includes three optional parameters: --startDT, --endDT, and --parameterCd.
@aaraney

Additions

  • cli.py

Removals

Changes

Testing

  1. Added minimal testing for CLI. Note: click includes test funtionality per CLIRunner, but this did not play well with asyncio, so I implemented similar functionality using subprocess.

Notes

Todos

Checklist

  • PR has an informative and human-readable title
  • PR is well outlined and documented. See #12 for an example
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (see CONTRIBUTING.md)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output) using numpy docstring formatting
  • Placeholder code is flagged / future todos are captured in comments
  • Reviewers requested with the Reviewers tool ➡️

@jarq6c jarq6c added the enhancement New feature or request label Mar 7, 2022
@jarq6c jarq6c requested a review from hellkite500 March 7, 2022 13:59
@jarq6c jarq6c self-assigned this Mar 7, 2022
@jarq6c
Copy link
Collaborator Author

jarq6c commented Mar 9, 2022

@aaraney I'm unable to add you as a reviewer until you comment. Any feedback you want to give?

@aaraney
Copy link
Member

aaraney commented Mar 10, 2022

@jarq6c, thanks for pinging me. Id seen this, but had not had a chance to take a look. I certainly want to give you feedback / a review -- let me go ahead and do that now.

Copy link
Member

@aaraney aaraney left a comment

Choose a reason for hiding this comment

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

This is a great addition, @jarq6c! Ive added several comments. I think we can continue conversation through that avenue. Really excited to see where this goes.

python/nwis_client/README.md Outdated Show resolved Hide resolved
python/nwis_client/README.md Show resolved Hide resolved
python/nwis_client/src/hydrotools/nwis_client/cli.py Outdated Show resolved Hide resolved
python/nwis_client/src/hydrotools/nwis_client/cli.py Outdated Show resolved Hide resolved
@jarq6c jarq6c merged commit 7747a67 into NOAA-OWP:main Mar 17, 2022
@jarq6c jarq6c deleted the nwis-client-cli branch March 17, 2022 18:55
@jarq6c
Copy link
Collaborator Author

jarq6c commented Mar 17, 2022

This has been published to PyPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update nwis client to canonical format Request: evaluation_tools.nwis_client CLI
3 participants