Remove ipythonrc references from documentation #664

Merged
merged 4 commits into from Sep 3, 2011

Projects

None yet

3 participants

@eteq

This pull request should remove all references to the old-style ipythonrc from the ipython documentation and docstrings (except where it is intentionally referring to an old version).

Note that I've left everything in quarantine and deathrow untouched, as well as docs/source/config/old.txt .

There was one reference to setting aliases in ipythonrc that I simply deleted, as the new ipython_config.py file does not seem to mention aliases. If there's some way of adding aliases that isn't in the default ipython_config.py, I can easily add that in.

@takluyver takluyver and 1 other commented on an outdated diff Aug 2, 2011
IPython/core/magic.py
@@ -640,11 +640,10 @@ Currently the magic system has the following functions:\n"""
search.
-i/-c: make the pattern case insensitive/sensitive. If neither of
- these options is given, the default is read from your ipythonrc
- file. The option name which sets this value is
- 'wildcards_case_sensitive'. If this option is not specified in your
- ipythonrc file, IPython's internal default is to do a case sensitive
- search.
+ these options are given, the default is read from your configuration
+ file, with the option name 'wildcards_case_sensitive'. If this option
@takluyver
takluyver Aug 2, 2011

We should probably give the full option name, like InteractiveShell.wildcards_case_sensitive, assuming it still exists.

@eteq
eteq Aug 2, 2011

I thought about that, but the problem is that it's different depending on which configuration file you're looking at - that is, in ipython_config.py it's TerminalInteractiveShell.wildcards_case_sensitive but in ipython_qtconsole_config.py it's ZMQInteractiveShell.wildcards_case_sensitive ... I could put both, but that seems a bit overly verbose. Alternatively, it could be (ShellClassName).wildcards_case_sensitive or something like that?

@takluyver
takluyver Aug 2, 2011

I think they're both inheriting it from InteractiveShell, so changing it for InteractiveShell should change it for each subclass. The question of configuring them separately can probably be left for the config section.

@eteq
eteq Aug 2, 2011

The changes I just committed (eteq/ipython@25f147e) address this and adjust similar places to reference more precisely what class the option belongs to. Thanks for the suggestion!

@takluyver takluyver commented on the diff Aug 2, 2011
docs/source/interactive/tips.txt
@@ -127,5 +127,9 @@ the IPython user list.
.. Now I have a nice little directory with everything I ever type in,
organized by project and date.
+.. warning::
+
+ This example uses the outdated ipythonrc-style configuration files, which no
+ longer work as of IPython 0.11
@takluyver
takluyver Aug 2, 2011

Don't worry, this section is already commented out (see http://ipython.org/ipython-doc/stable/interactive/tips.html ). But if you feel like updating it for the new system (look for exec_lines in the ipython_config file), please do.

@eteq
eteq Aug 2, 2011

I've used exec_lines, but I don't actually understand what that example is doing or what configuration file it's referring to...

@takluyver
takluyver Aug 2, 2011

I think it's just dropping logs into a particular directory, with filenames including the date. Actually, looking at it, I'm not sure if it's still needed - now all your history for a given profile is recorded in a database, and each session has a timestamp.

@eteq
eteq Aug 2, 2011

Ah, so it is - there might be something similar to be done to be able to tie entries in the database to a particular project of some sort, but that would be executed totally differently than what is shown here.

I could send up a commit that gets rid of it completely as part of this pull request if desired (although it's easy enough to have a committer like yourself do it directly).

@takluyver
takluyver Aug 2, 2011

You get a separate history database per profile, so all you'd need is a profile for the project. It's not quite as neat as having logs in your folder, but that's a matter for another day.

I think it can go for now. If we want to update it, it feels like more of a cookbook thing than part of the main documentation.

@fperez
IPython member

@takluyver, I'll leave this one to you since you've already started working on it. Is it ready to merge? I'm just trying to flush the queue a little before euroscipy...

@takluyver takluyver commented on an outdated diff Aug 16, 2011
docs/source/interactive/reference.txt
@@ -696,8 +697,7 @@ Even object attributes can be expanded::
System command aliases
----------------------
-The %alias magic function and the alias option in the ipythonrc
-configuration file allow you to define magic functions which are in fact
+The %alias magic functionallows you to define magic functions which are in fact
@takluyver
takluyver Aug 16, 2011

"functionallows" --> "function allows"

@takluyver takluyver commented on an outdated diff Aug 16, 2011
IPython/zmq/zmqshell.py
@@ -242,9 +242,10 @@ class ZMQInteractiveShell(InteractiveShell):
docstring for how to change the editor hook.
You can also set the value of this editor via the command line option
- '-editor' or in your ipythonrc file. This is useful if you wish to use
- specifically for IPython an editor different from your typical default
- (and for Windows users who typically don't set environment variables).
+ '-editor' or via the 'editor' option in your configuration file.
@takluyver
takluyver Aug 16, 2011

These names are out of date. Looking at the config file, it's c.TerminalInteractiveShell.editor. And it doesn't look like it has a short alias at the command line.

@takluyver takluyver commented on an outdated diff Aug 16, 2011
IPython/core/magic.py
@@ -2270,9 +2269,11 @@ Currently the magic system has the following functions:\n"""
docstring for how to change the editor hook.
You can also set the value of this editor via the command line option
- '-editor' or in your ipythonrc file. This is useful if you wish to use
- specifically for IPython an editor different from your typical default
- (and for Windows users who typically don't set environment variables).
+ '-editor' or in your configuration file (via the
@takluyver
takluyver Aug 16, 2011

I don't think this command line option will work.

@takluyver
IPython member

Just spotted a few more things. Also, I think we can lose the last section of docs/source/interactive/tips.txt (which is already commented out). If someone wants to update it, I think it's a better fit for the cookbook.

@eteq

All 3 items should now be fixed.

One other thing that seems odd (although probably not for this pull request): despite the editor magic being present in ZMQInteractiveShell, there seems to be no editor variable associated with ZMQInteractiveShell (it's defined in TerminalInteractiveShell rather than InteractiveShell). I'm not sure if this is a problem as I haven't looked at the edit magic internals, but it seems a bit strange...

@takluyver
IPython member

That's deliberate. The editor option is intended to be a terminal editor like vi or nano. It works a bit differently with ZMQ - it just sends the code to the frontend for editing. For the Qt console, there's an IPythonWidget.editor option to invoke a GUI editor.

@takluyver takluyver merged commit 00e96ae into ipython:master Sep 3, 2011
@takluyver
IPython member

Thanks, @eteq - I've merged this in now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment