##// END OF EJS Templates
Merge pull request #13467 from ktetzlaff/fix_config_rst...
Merge pull request #13467 from ktetzlaff/fix_config_rst docs/source/development/config.rst: fix function references for `get_ipython_dir` and `locate_profile`

File last commit:

r27431:22c27513
r27447:7f0c017f merge
Show More
config.rst
128 lines | 4.7 KiB | text/x-rst | RstLexer
Brian Granger
Major work on the documentation....
r2277 .. _config_overview:
============================================
Overview of the IPython configuration system
============================================
Thomas Kluyver
Remove documentation of machinery that is now in traitlets...
r21385 This section describes the IPython configuration system. This is based on
:mod:`traitlets.config`; see that documentation for more information
about the overall architecture.
MinRK
update docs to reflect XDG support, new ~/.config/ipython default
r3351
Brian Granger
Major work on the documentation....
r2277 Configuration file location
===========================
MinRK
update config docs with recent changes...
r4040 So where should you put your configuration files? IPython uses "profiles" for
configuration, and by default, all profiles will be stored in the so called
"IPython directory". The location of this directory is determined by the
following algorithm:
Brian Granger
Major work on the documentation....
r2277
MinRK
document locating IPython files
r7089 * If the ``ipython-dir`` command line flag is given, its value is used.
Brian Granger
Major work on the documentation....
r2277
Thomas Kluyver
Remove documentation of machinery that is now in traitlets...
r21385 * If not, the value returned by :func:`IPython.paths.get_ipython_dir`
Bradley M. Froehle
IPYTHON_DIR -> IPYTHONDIR in comments and documentation
r6696 is used. This function will first look at the :envvar:`IPYTHONDIR`
Thomas Kluyver
Update doc references to .config/ipython
r13417 environment variable and then default to :file:`~/.ipython`.
Bradley M. Froehle
Add notes in the what's new and config sections.
r6701 Historical support for the :envvar:`IPYTHON_DIR` environment variable will
be removed in a future release.
MinRK
update docs to reflect XDG support, new ~/.config/ipython default
r3351
Thomas Kluyver
Update doc references to .config/ipython
r13417 For most users, the configuration directory will be :file:`~/.ipython`.
Previous versions of IPython on Linux would use the XDG config directory,
creating :file:`~/.config/ipython` by default. We have decided to go
back to :file:`~/.ipython` for consistency among systems. IPython will
issue a warning if it finds the XDG location, and will move it to the new
location if there isn't already a directory there.
Brian Granger
Major work on the documentation....
r2277
MinRK
update config docs with recent changes...
r4040 Once the location of the IPython directory has been determined, you need to know
which profile you are using. For users with a single configuration, this will
Matthias Geier
DOC: minor fix
r24151 simply be 'default', and will be located in
Bradley M. Froehle
IPYTHON_DIR -> IPYTHONDIR in comments and documentation
r6696 :file:`<IPYTHONDIR>/profile_default`.
MinRK
update config docs with recent changes...
r4040
The next thing you need to know is what to call your configuration file. The
basic idea is that each application has its own default configuration filename.
The default named used by the :command:`ipython` command line program is
:file:`ipython_config.py`, and *all* IPython applications will use this file.
Matthias Bussonnier
Remove most of the ipyparallel info in the documentation.
r22788 The IPython kernel will load its own config file *after*
:file:`ipython_config.py`. To load a particular configuration file instead of
the default, the name can be overridden by the ``config_file`` command line
flag.
MinRK
update config docs with recent changes...
r4040
To generate the default configuration files, do::
David P. Sanders
Uniformized prompt to
r11984 $ ipython profile create
MinRK
update config docs with recent changes...
r4040
and you will have a default :file:`ipython_config.py` in your IPython directory
Matthias Bussonnier
Remove most of the ipyparallel info in the documentation.
r22788 under :file:`profile_default`.
Matthias Geier
DOC: minor fix
r24151
Matthias Bussonnier
Document IPYTHON_SUPPRESS_CONFIG_ERRORS....
r22372 .. note::
Matthias Bussonnier
Update config.rst
r22377 IPython configuration options are case sensitive, and IPython cannot
catch misnamed keys or invalid values.
By default IPython will also ignore any invalid configuration files.
Matthias Bussonnier
Document IPYTHON_SUPPRESS_CONFIG_ERRORS....
r22372
.. versionadded:: 5.0
IPython can be configured to abort in case of invalid configuration file.
To do so set the environment variable ``IPYTHON_SUPPRESS_CONFIG_ERRORS`` to
`'1'` or `'true'`
MinRK
document locating IPython files
r7089
Locating these files
--------------------
From the command-line, you can quickly locate the IPYTHONDIR or a specific
profile with:
.. sourcecode:: bash
David P. Sanders
Uniformized prompt to
r11984 $ ipython locate
MinRK
document locating IPython files
r7089 /home/you/.ipython
David P. Sanders
Uniformized prompt to
r11984 $ ipython locate profile foo
MinRK
document locating IPython files
r7089 /home/you/.ipython/profile_foo
Kai Tetzlaff (moka.tetzco.de)
fix function references for get_ipython_dir and locate_profile
r27431 These map to the utility functions: :func:`IPython.paths.get_ipython_dir`
and :func:`IPython.paths.locate_profile` respectively.
MinRK
document locating IPython files
r7089
Thomas Kluyver
Start separating config docs into user and developer parts
r13492 .. _profiles_dev:
Brian Granger
Major work on the documentation....
r2277
Profiles
========
MinRK
update config docs with recent changes...
r4040 A profile is a directory containing configuration and runtime files, such as
logs, connection info for the parallel apps, and your IPython command history.
The idea is that users often want to maintain a set of configuration files for
different purposes: one for doing numerical computing with NumPy and SciPy and
another for doing symbolic computing with SymPy. Profiles make it easy to keep a
separate configuration files, logs, and histories for each of these purposes.
Brian Granger
Major work on the documentation....
r2277
Let's start by showing how a profile is used:
.. code-block:: bash
Thomas Kluyver
Update more examples of command line args in the docs, and make a few minor formatting corrections.
r4198 $ ipython --profile=sympy
Brian Granger
Major work on the documentation....
r2277
MinRK
update config docs with recent changes...
r4040 This tells the :command:`ipython` command line program to get its configuration
from the "sympy" profile. The file names for various profiles do not change. The
only difference is that profiles are named in a special way. In the case above,
Bradley M. Froehle
IPYTHON_DIR -> IPYTHONDIR in comments and documentation
r6696 the "sympy" profile means looking for :file:`ipython_config.py` in :file:`<IPYTHONDIR>/profile_sympy`.
MinRK
update config docs with recent changes...
r4040
The general pattern is this: simply create a new profile with:
.. code-block:: bash
David P. Sanders
Uniformized prompt to
r11984 $ ipython profile create <name>
MinRK
update config docs with recent changes...
r4040
which adds a directory called ``profile_<name>`` to your IPython directory. Then
Thomas Kluyver
Update more examples of command line args in the docs, and make a few minor formatting corrections.
r4198 you can load this profile by adding ``--profile=<name>`` to your command line
MinRK
update config docs with recent changes...
r4040 options. Profiles are supported by all IPython applications.
Thomas Kluyver
Remove documentation of machinery that is now in traitlets...
r21385 IPython extends the config loader for Python files so that you can inherit
config from another profile. To do this, use a line like this in your Python
config file:
.. sourcecode:: python
load_subconfig('ipython_config.py', profile='default')