HydrologicEngineeringCenter / HydrologicEngineeringCenter/cwms-python
Dry Run Flag
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 16
- Forks
- 11
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 8
Description
Add the ability to provide a dry_run=True to the init of cwms-python that prevents the calls from actually triggering.
The idea would be something like cwms-cli, or other scripts, can trigger everything in the script to test logic but not actually trigger the HTTP calls.
Possible read the dry_run flag in GET/POST/DELETE/etc methods and do a simple return/console log of "Dry Run Enabled: Skipping DELETE"
While you can implement this in each script and set the arg there. I think it would be easier to allow an env var to be set and also provide another argument to the init(..., dry_run) to account for this!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the cwms-python initializer and its GET, POST, DELETE, and other HTTP methods. Trace how scripts such as cwms-cli invoke them and determine how an initializer argument and environment variable should interact. Done means dry-run mode prevents HTTP calls while allowing scripts to exercise their logic and reports the skipped operation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100