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

Create a python document that allows running the code with multiple options #2

Open
amaes3owp opened this issue Sep 3, 2019 · 0 comments

Comments

@amaes3owp
Copy link

The current document defines the options available to compute the inland routing in the channel. It will be useful to have another document that allows the user to run multiple options using flags or arguments.

Expected Behavior

In a similar project we have a document that contains all the functions to run the program. There is an additional document that reads as argument the options to run the program. For example we can have a single call:

usage: OWP_inland_routing.py [-h HELP] [-a APPROACH] [-s START_DATE]
[-e END_DATE] [-S SYNTHETIC_HYDROGRAPH_OPTION] [-o] [-d] [-a]
[-w] instance

Current Behavior

Such option is not available at this time

Possible Solution

Create a new python document with argparse.ArgumentParser

parser = argparse.ArgumentParser(description=describe, formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('instance', help='A number between 0 and 2046, selects the gage to process from ref_nwis.nc', type=partial(checkInRange, 0, 2046))

Steps to Reproduce (for bugs)

  1. The program should produce the same response every time we run the the same options
  2. It should facilitate the evaluation of multiple test cases
  3. It should help to detect if there are problems in the code or execution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant