-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
--help
defaults values doesn't updated with default config files
#47
Comments
In the help I do normally see them in the correct order. It depends on time added and argument groups. Each ActionParser becomes a group so all its arguments should appear together in time added order plus its argument groups. If you can confirm that the order is incorrect, please create an issue with code to reproduce it.
I guess this is because of the ActionParser not being given a title. If you give a title it will look okay. Later I will fix it so that if it is not given a title then nothing is shown.
From what I see this does work correctly. Note that if no file matches any of the patterns in >>> from jsonargparse import ArgumentParser
>>> p=ArgumentParser(default_config_files=['config.yaml'])
>>> p.add_argument('--op', default='from default')
>>> p.parse_args([])
Namespace(__default_config__=Path(config.yaml, cwd=/home/***), op='from yaml') Observe that the Namespace includes a |
- yaml/json dump kwargs can now be changed via attributes dump_yaml_kwargs and dump_json_kwargs. - Add argument with type Enum or type hint giving an action now raises error #45. - Now by default dump/save/print_config preserve the add arguments and argument groups order (python>=3.6) #46. - ActionParser group title now defaults to None if not given #47.
This is now fixed in the current version in master. |
Sorry, what I really meant is: "Default values for --help message aren't update with having default config files." |
My bad. It was clear from the issue title. This can be done. |
… config file was loaded #47. - get_default method now also considers default_config_files. - get_defaults now raises ParserError if default config file not valid. - default_config_files property not removing help group when setting None. - Improved Path class home prefix '~' support.
In the new release v3.8.0 in the help the titles are no longer object references and the default values are updated from a default config file if present. |
Thanks for the full --help command.
Couple of small problems I have spotted so far:
--print_config
preserve original order #46.... object at 0x7f3670c6dc50
.The text was updated successfully, but these errors were encountered: