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

No help message when mandatory argument is missing. #115

Open
bhigy opened this issue Jun 3, 2021 · 2 comments
Open

No help message when mandatory argument is missing. #115

bhigy opened this issue Jun 3, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@bhigy
Copy link
Contributor

bhigy commented Jun 3, 2021

PlataleaConfig deactivates the help message by default and has a method called enable_help() to reactivate it. The way it is implemented now, arguments are parsed first and we check for the presence of the flag -h. However, if mandatory arguments aren't provided, parsing will fail and send an error message before we get a chance to trigger the help message.

This issue can be replicated by, e.g., running following command:

python -m platalea.utils.evaluate_net -h
@bhigy bhigy added the bug Something isn't working label Jun 3, 2021
@egpbos
Copy link
Collaborator

egpbos commented Jun 16, 2021

Related to #62

@egpbos
Copy link
Collaborator

egpbos commented Jun 16, 2021

As discussed during Teams meeting:

  • We may not need the PlataleaConfig class at all anymore, but could just replace it with a regular configargparse parser. Let's try just replacing the whole thing.
  • Otherwise, we don't need the enable_help anymore anyway, because it was used to be able to parse twice (which we did in the library code first and then second in the experiment), but we don't do that anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants