gridpath
gridpath copied to clipboard
Improving script and function argument handling
This is an initial attempt to resolve #111 , ultimately a part of #6 .
The first commit is an attempt to handle the need for strict handling of unrecognised arguments during command-line operation, while also being flexible when the scripts are being called internally - in this instance, when get_scenario_inputs. I am detecting whether arguments have been passed directly to the function argument, or via sys.argv. Based on that, I'm taking inspiration from @gerritdm 's posts in the issue and his work in the viz suite.
Please review. If this looks okay, I will do this for all the other argument parsing entry points. Other cleanup will then follow.