diff --git a/IPython/config/tests/test_imports.py b/IPython/config/tests/test_imports.py index 58f8218..7987b88 100644 --- a/IPython/config/tests/test_imports.py +++ b/IPython/config/tests/test_imports.py @@ -4,3 +4,7 @@ def test_import_configloader(): from IPython.config import configloader +def test_import_userconfig(): + from IPython.config import userconfig + + diff --git a/IPython/UserConfig/__init__.py b/IPython/config/userconfig/__init__.py similarity index 100% rename from IPython/UserConfig/__init__.py rename to IPython/config/userconfig/__init__.py diff --git a/IPython/UserConfig/ipy_user_conf.py b/IPython/config/userconfig/ipy_user_conf.py similarity index 100% rename from IPython/UserConfig/ipy_user_conf.py rename to IPython/config/userconfig/ipy_user_conf.py diff --git a/IPython/UserConfig/ipythonrc b/IPython/config/userconfig/ipythonrc similarity index 100% rename from IPython/UserConfig/ipythonrc rename to IPython/config/userconfig/ipythonrc diff --git a/IPython/UserConfig/ipythonrc-math b/IPython/config/userconfig/ipythonrc-math similarity index 100% rename from IPython/UserConfig/ipythonrc-math rename to IPython/config/userconfig/ipythonrc-math diff --git a/IPython/UserConfig/ipythonrc-numeric b/IPython/config/userconfig/ipythonrc-numeric similarity index 100% rename from IPython/UserConfig/ipythonrc-numeric rename to IPython/config/userconfig/ipythonrc-numeric diff --git a/IPython/UserConfig/ipythonrc-physics b/IPython/config/userconfig/ipythonrc-physics similarity index 100% rename from IPython/UserConfig/ipythonrc-physics rename to IPython/config/userconfig/ipythonrc-physics diff --git a/IPython/UserConfig/ipythonrc-pysh b/IPython/config/userconfig/ipythonrc-pysh similarity index 100% rename from IPython/UserConfig/ipythonrc-pysh rename to IPython/config/userconfig/ipythonrc-pysh diff --git a/IPython/UserConfig/ipythonrc-tutorial b/IPython/config/userconfig/ipythonrc-tutorial similarity index 100% rename from IPython/UserConfig/ipythonrc-tutorial rename to IPython/config/userconfig/ipythonrc-tutorial diff --git a/IPython/core/iplib.py b/IPython/core/iplib.py index 81fc0a8..4870306 100644 --- a/IPython/core/iplib.py +++ b/IPython/core/iplib.py @@ -167,7 +167,7 @@ where you can customize many aspects of IPython's functionality in:\n""") printf(ipythondir) - rcdirend = os.path.join('IPython','UserConfig') + rcdirend = os.path.join('IPython','config','userconfig') cfg = lambda d: os.path.join(d,rcdirend) try: rcdir = filter(os.path.isdir,map(cfg,sys.path))[0] diff --git a/IPython/core/magic.py b/IPython/core/magic.py index 8d6aaac..13baf64 100644 --- a/IPython/core/magic.py +++ b/IPython/core/magic.py @@ -3352,7 +3352,7 @@ Defaulting color scheme to 'NoColor'""" ip = self.getapi() ipinstallation = path(IPython.__file__).dirname() upgrade_script = '%s "%s"' % (sys.executable,ipinstallation / 'utils' / 'upgradedir.py') - src_config = ipinstallation / 'UserConfig' + src_config = ipinstallation / 'config' / 'userconfig' userdir = path(ip.options.ipythondir) cmd = '%s "%s" "%s"' % (upgrade_script, src_config, userdir) print ">",cmd diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 1a6624b..954e638 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -224,7 +224,7 @@ def make_runners(): # These are tested by nose, so skip IPython.kernel top_pack = ['config','Extensions','frontend', - 'testing','tests','tools','UserConfig'] + 'testing','tests','tools','userconfig'] if have_wx: top_pack.append('gui') diff --git a/IPython/testing/plugin/ipdoctest.py b/IPython/testing/plugin/ipdoctest.py index 24fa734..3428af4 100644 --- a/IPython/testing/plugin/ipdoctest.py +++ b/IPython/testing/plugin/ipdoctest.py @@ -64,8 +64,8 @@ def default_argv(): # Get the install directory for the user configuration and tell ipython to # use the default profile from there. - from IPython import UserConfig - ipcdir = os.path.dirname(UserConfig.__file__) + from IPython.config import userconfig + ipcdir = os.path.dirname(userconfig.__file__) #ipconf = os.path.join(ipcdir,'ipy_user_conf.py') ipconf = os.path.join(ipcdir,'ipythonrc') #print 'conf:',ipconf # dbg diff --git a/docs/source/development/reorg.txt b/docs/source/development/reorg.txt index 41795db..d475693 100644 --- a/docs/source/development/reorg.txt +++ b/docs/source/development/reorg.txt @@ -204,12 +204,12 @@ Top-level sub-packages: * :file:`testing`. Good where it is. -* :file:`tests`. Good where it is. +* :file:`tests`. Remove. * :file:`tools`. Things in here need to be looked at and moved elsewhere like :file:`IPython.utils`. -* :file:`UserConfig`. Move to a subdirectory of :file:`IPython.config`. +* :file:`UserConfig`. Move to :file:`IPython.config.userconfig`. * :file:`config`. Good where it is! @@ -217,8 +217,6 @@ Top-level sub-packages: * :file:`frontend`. Good where it is! - - * :file:`gui`. Eventually this should be moved to a subdir of :file:`IPython.frontend`.