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

add extra_config_file #3592

Merged
merged 2 commits into from Jul 12, 2013
Merged

add extra_config_file #3592

merged 2 commits into from Jul 12, 2013

Conversation

minrk
Copy link
Member

@minrk minrk commented Jul 9, 2013

and --config alias

for loading a single extra config file, e.g.

ipython notebook --config mycfg.py

which will be strictly in addition to, and at higher priority than, existing config files, profiles, etc.

Note that the loading code hasn't changed, it's just indented to put it in a for-loop.

This is added primarily for nbconvert, but the NbConvertApp will need to be fixed to properly inherit flags and aliases from the base application, like all other IPython apps.

minrk added 2 commits July 9, 2013 15:45
and `--config` alias

for loading a single extra config file, e.g.

    ipython notebook --config mycfg.py

which will be strictly in addition to, and at higher priority than, existing config files, profiles, etc.

Note that the loading code hasn't changed, it's just indented to put it in a for-loop.
@@ -84,14 +85,14 @@ class BaseIPythonApplication(Application):

# Track whether the config_file has changed,
# because some logic happens only if we aren't using the default.
config_file_specified = Bool(False)
config_file_specified = Set()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I am not quite following why this should be a Set...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit more generic now, and can track more than one value.

@takluyver
Copy link
Member

Could you explain the rationale for this a bit more? I'm a bit wary of adding more complexity to the config system, especially as, from discussions at SciPy, we might want to add another degree of complexity in some form of declarative config files.

@Carreau
Copy link
Member

Carreau commented Jul 10, 2013

The main point is for nbconvert. @ellisonbg and @jdfreder are writting the CL tool and want to have a config file on a per folder basis to be able to do

ipython nbconvert --config=my-project-to-pdf-config.py *.ipynb

@takluyver
Copy link
Member

OK, that makes sense, and I don't see any simpler way to achieve it.

On 10 July 2013 12:53, Matthias Bussonnier notifications@github.com wrote:

The main point is for nbconvert. @ellisonbg https://github.com/ellisonbgand
@jdfreder https://github.com/jdfreder are writting the CL tool and want
to have a config file on a per folder basis to be able to do

ipython nbconvert --config=my-project-to-pdf-config.py *.ipynb


Reply to this email directly or view it on GitHubhttps://github.com//pull/3592#issuecomment-20737008
.

@jdfreder
Copy link
Member

#3607 👍

@damianavila
Copy link
Member

👍 for me!

Carreau added a commit that referenced this pull request Jul 12, 2013
add extra_config_file

and --config alias

for loading a single extra config file, e.g.

ipython notebook --config mycfg.py
which will be strictly in addition to, and at higher priority than, existing config files, profiles, etc.

Note that the loading code hasn't changed, it's just indented to put it in a for-loop.

This is added primarily for nbconvert, but the NbConvertApp will need to be fixed to properly inherit flags and aliases from the base application, like all other IPython apps.
@Carreau Carreau merged commit f996ba3 into ipython:master Jul 12, 2013
minrk added a commit that referenced this pull request Jul 15, 2013
fix regression in #3592 preventing default config files from loading
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
add extra_config_file

and --config alias

for loading a single extra config file, e.g.

ipython notebook --config mycfg.py
which will be strictly in addition to, and at higher priority than, existing config files, profiles, etc.

Note that the loading code hasn't changed, it's just indented to put it in a for-loop.

This is added primarily for nbconvert, but the NbConvertApp will need to be fixed to properly inherit flags and aliases from the base application, like all other IPython apps.
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
fix regression in ipython#3592 preventing default config files from loading
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.

None yet

6 participants