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

Option parser #351

Open
HomesGH opened this issue Nov 25, 2024 · 0 comments
Open

Option parser #351

HomesGH opened this issue Nov 25, 2024 · 0 comments

Comments

@HomesGH
Copy link
Contributor

HomesGH commented Nov 25, 2024

Describe the bug
There are (at least) two issues with the option parser.

  1. The last letters in a long option can be omitted and the option is still valid. E.g. --step=21 is the same as --steps=21 or --final-checkpoin=0 is the same as --final-checkpoint=0.

  2. Why is --final-checkpoint an int and not a bool? What does --final-checkpoint=2 mean? If it is boolean, it should (still) work with --final-checkpoint=1|0|True|False.

    op->add_option("--final-checkpoint").dest("final-checkpoint").type("int").metavar("(1|0)").set_default(1).help("enable/disable final checkopint (default: %default)");

To Reproduce
Run any simulation and specify one of the options above.

Expected behavior
It should exit with an error if no valid option is passed.

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