Open MichaelPesce opened 1 year ago
This should use argparse, simplifying main in each script and they should be added to the tests.
Just checked on Codecov and the argument-parsing part of the code is indeed currently untested:
@dangunter you mentioned a solution which included argparse, but I wasn't sure about this... here's a snapshot of the code now:
@adam-a-a The argparse
tutorial from the Python docs could be a good starting point as the example they use looks fairly similar to that code.
Thanks, @lbianchi-lbl - I probably won't be able to get to this for some time (as simple as it may be) but will add it to the list.
Description
Running the amo_1690_sweep.py file through command line returns a "ValueError: 1 is not yet implemented", regardless of which case_num is entered.
Expected Behavior
When running amo_1690_sweep.py through command line, it expects anywhere from 1 to 3 arguments. The first argument is the case_num that determines which case should be run. However, case_num is expected to be an integer and the arguments are strings, so no case numbers can be recognized, which results in the ValueError.
Steps to Reproduce
python amo_1690_sweep.py 1
Environment
Anything Else?
This issue is not limited to amo_1690. It appears to be an issue in all or most parameter_sweep files inside subdirectories of watertap/examples/flowsheets/case_studies/wastewater_resource_recovery.