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

allow short name alternatives for setting fields from command line #104

Open
tmchartrand opened this issue Apr 28, 2020 · 1 comment
Open

Comments

@tmchartrand
Copy link

Seems like it would be fairly straightforward to add the option of setting short names for fields to make them easier to specify from the command line ("-i" vs "--input"), unless I'm missing something and this is already possible?
If this would make sense to include I'd be glad to test something out and file a PR at some point.

@fcollman
Copy link
Member

So the only problem here is when you have nested inputs, it's not obvious how to handle those, and you have to make sure that you aren't repeating keys across things. You could try though just adding in some extra metadata to the fields, and then modifying the argparse constructor. One thing to watch out for would be if you had someone specify a short_name that conflicts with a long name. (particularly across potentially nested parameters).

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

2 participants