Opened 10 years ago

Closed 8 years ago

#12167 closed enhancement (duplicate)

Move SAGE_ROOT/ipython to extcode

Reported by: jdemeyer Owned by: tbd
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: distribution Keywords:
Cc: iandrus Merged in:
Authors: Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by jdemeyer)

There is absolutely no reason for $SAGE_ROOT/ipythonrc to be in the root repo. It would better be moved to $SAGE_ROOT/data/extcode/dotsage/ipython. The idea then being that the whole contents of extcode/dotsage would be copied to $DOT_SAGE.

Apply all 4 patches below to the respective repositories.

Attachments (4)

12167_ipython_root.patch (40.0 KB) - added by jdemeyer 10 years ago.
12167_ipython_sage.patch (6.2 KB) - added by jdemeyer 10 years ago.
12167_ipython_extcode.patch (50.1 KB) - added by jdemeyer 10 years ago.
12167_ipython_scripts.patch (1.1 KB) - added by jdemeyer 10 years ago.

Download all attachments as: .zip

Change History (11)

Changed 10 years ago by jdemeyer

Changed 10 years ago by jdemeyer

Changed 10 years ago by jdemeyer

comment:1 Changed 10 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Description modified (diff)

Changed 10 years ago by jdemeyer

comment:2 follow-up: Changed 10 years ago by jhpalmieri

Actually, except for ipythonrc, these files are part of the IPython distribution: see local/lib/python/site-libraries/IPython/UserConfig/ and the various ipy_profile_* files in .../IPython/Extensions. We should use those files instead, copying them to $DOTSAGE/ipython when necessary, adding just one of ours: our version of ipythonrc. That file could be part of the IPython spkg, and we could just add it to the UserConfig directory, as ipythonrc-sage, and we could rename it when copying it to $DOTSAGE. (I started working on this a while ago, but then decided that we should also use the newer format for profiles, and then got bogged down. That aspect could maybe wait until IPython 0.12 is out.)

comment:3 in reply to: ↑ 2 ; follow-up: Changed 10 years ago by jdemeyer

Replying to jhpalmieri:

Actually, except for ipythonrc, these files are part of the IPython distribution: see local/lib/python/site-libraries/IPython/UserConfig/

Did you mean instead

local/lib/python/site-packages/IPython

The ipython files currently in SAGE_ROOT actually differ quite a bit from the files in that directory, so I'm not sure we can simply copy the files from ipython.

Also, there is a file $SAGE_ROOT/ipython/ipythonrc-scipy which isn't anywhere else (not even in the scipy spkg).

comment:4 in reply to: ↑ 3 Changed 10 years ago by jhpalmieri

Replying to jdemeyer:

Did you mean instead

local/lib/python/site-packages/IPython

The ipython files currently in SAGE_ROOT actually differ quite a bit from the files in that directory, so I'm not sure we can simply copy the files from ipython.

As far as I can tell, (a) we don't actually use these for anything, and (b) the ones which have changed have actually been updated in recent versions of IPython. (I think only a few of them differ.) They are just examples of configuration files. Except for ipythonrc, which is Sage-specific, it makes more sense to take these from the IPython spkg, so that they can be updated when IPython is. I think that if we didn't copy these files to ~/.sage/ipython in the sage-sage` script, then IPython would do it instead, but noisily. I wonder if we copied these over just to avoid the IPython messages during start up...

Also, there is a file $SAGE_ROOT/ipython/ipythonrc-scipy which isn't anywhere else (not even in the scipy spkg).

I bet that either this used to be included with IPython, or someone wrote it for use with SciPy a long time ago. In any case, I don't think any of these files are used except for ipythonrc. I think we could safely delete ipythonrc-scipy, but we could instead include that, for example, in the IPython spkg.

I completely agree that these files don't belong in the top-level Sage directory. Sensible places for the non-standard file(s) would be the IPython directory in local/lib/..., local/share/ipython/, data/extcode/dotsage as you suggested, or data/extcode/ipython.

comment:5 Changed 9 years ago by jhpalmieri

I'm tempted to make #12719 a prerequisite for this: we should update to IPython 0.12, and this will require (I think) revising the formats of the configuration files. While doing that, we can also move them elsewhere, or just create a single Sage config file and put it somewhere sensible.

comment:6 Changed 8 years ago by iandrus

  • Cc iandrus added

comment:7 Changed 8 years ago by jdemeyer

  • Authors Jeroen Demeyer deleted
  • Milestone changed from sage-5.7 to sage-duplicate/invalid/wontfix
  • Resolution set to duplicate
  • Reviewers set to Jeroen Demeyer
  • Status changed from new to closed

Fixed by #12719.

Note: See TracTickets for help on using tickets.