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

always override config files with CLI options #250

Merged
merged 1 commit into from
Jul 29, 2016

Conversation

minrk
Copy link
Member

@minrk minrk commented Jun 24, 2016

This includes #249, so will need a rebase after that's merged

This is done in all IPython and Jupyter traitlets Applications, but not implemented in the base Application class until now.

  • save copy of cli_config in Application.cli_config during parse_command_line
  • apply cli_config to config from files prior to loading,
    so that any lower-priority changes in config files are never loaded by the application,
    rather than requiring load and re-load to preserve priority.

avoids bugs like #248 by applying CLI config priority in load_config_file instead of relying on applications to implement it.

If we want to preserve prior behavior of load_config_file clobbering CLI config, we can put this behavior beind an optional flag in load_config_file or an attribute on Application.

@minrk minrk force-pushed the cli-priority-part-2-boogaloo-and-such branch from 9a1f321 to 809ce98 Compare June 24, 2016 22:03
@minrk minrk added this to the 4.3 milestone Jun 24, 2016
@fperez
Copy link
Member

fperez commented Jun 25, 2016

+1, logic looks good, and the small changes I suggested to #249 should propagate cleanly upon rebase.

- save cli_config in Application.cli_config
- apply cli_config to config from files prior to loading,
  so that any lower-probity changes are never loaded by the application,
  rather than requiring load and re-load to preserve order
@minrk minrk force-pushed the cli-priority-part-2-boogaloo-and-such branch from 809ce98 to a6852ec Compare July 29, 2016 09:30
@minrk minrk merged commit f4cc402 into ipython:master Jul 29, 2016
@minrk minrk deleted the cli-priority-part-2-boogaloo-and-such branch July 29, 2016 10:09
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.

2 participants