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

Improving script and function argument handling #1095

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

milindsmart
Copy link
Contributor

@milindsmart milindsmart commented Feb 10, 2024

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.

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

Successfully merging this pull request may close these issues.

Error-handling for missing or incorrectly specified script arguments
1 participant