From cbe6a036eedd92c15728475bf57d0a6773673d48 2015-03-25 17:23:19 From: Min RK Date: 2015-03-25 17:23:19 Subject: [PATCH] remove bundled profiles and move README_STARTUP to core/profile --- diff --git a/IPython/config/profile/README b/IPython/config/profile/README deleted file mode 100644 index f8f2f7f..0000000 --- a/IPython/config/profile/README +++ /dev/null @@ -1,10 +0,0 @@ -This is the IPython directory. - -For more information on configuring IPython, do: - -ipython -h - -or to create an empty default profile, populated with default config files: - -ipython profile create - diff --git a/IPython/config/profile/__init__.py b/IPython/config/profile/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/IPython/config/profile/__init__.py +++ /dev/null diff --git a/IPython/config/profile/cluster/ipython_config.py b/IPython/config/profile/cluster/ipython_config.py deleted file mode 100644 index eb4b3fc..0000000 --- a/IPython/config/profile/cluster/ipython_config.py +++ /dev/null @@ -1,13 +0,0 @@ -c = get_config() -app = c.InteractiveShellApp - -# This can be used at any point in a config file to load a sub config -# and merge it into the current one. -load_subconfig('ipython_config.py', profile='default') - -lines = """ -from IPython.parallel import * -""" - -app.exec_lines.append(lines) - diff --git a/IPython/config/profile/math/ipython_config.py b/IPython/config/profile/math/ipython_config.py deleted file mode 100644 index 39c5ca7..0000000 --- a/IPython/config/profile/math/ipython_config.py +++ /dev/null @@ -1,13 +0,0 @@ -c = get_config() -app = c.InteractiveShellApp - -# This can be used at any point in a config file to load a sub config -# and merge it into the current one. -load_subconfig('ipython_config.py', profile='default') - -lines = """ -import cmath -from math import * -""" - -app.exec_lines.append(lines) diff --git a/IPython/config/profile/pysh/ipython_config.py b/IPython/config/profile/pysh/ipython_config.py deleted file mode 100644 index 0f3bf6e..0000000 --- a/IPython/config/profile/pysh/ipython_config.py +++ /dev/null @@ -1,24 +0,0 @@ -c = get_config() -app = c.InteractiveShellApp - -# This can be used at any point in a config file to load a sub config -# and merge it into the current one. -load_subconfig('ipython_config.py', profile='default') - -c.PromptManager.in_template = r'{color.LightGreen}\u@\h{color.LightBlue}[{color.LightCyan}\Y1{color.LightBlue}]{color.Green}|\#> ' -c.PromptManager.in2_template = r'{color.Green}|{color.LightGreen}\D{color.Green}> ' -c.PromptManager.out_template = r'<\#> ' - -c.PromptManager.justify = True - -c.InteractiveShell.separate_in = '' -c.InteractiveShell.separate_out = '' -c.InteractiveShell.separate_out2 = '' - -c.PrefilterManager.multi_line_specials = True - -lines = """ -%rehashx -""" - -app.exec_lines.append(lines) diff --git a/IPython/config/profile/sympy/ipython_config.py b/IPython/config/profile/sympy/ipython_config.py deleted file mode 100644 index 6004cf1..0000000 --- a/IPython/config/profile/sympy/ipython_config.py +++ /dev/null @@ -1,20 +0,0 @@ -c = get_config() -app = c.InteractiveShellApp - -# This can be used at any point in a config file to load a sub config -# and merge it into the current one. -load_subconfig('ipython_config.py', profile='default') - -lines = """ -from __future__ import division -from sympy import * -x, y, z, t = symbols('x y z t') -k, m, n = symbols('k m n', integer=True) -f, g, h = symbols('f g h', cls=Function) -""" - -app.exec_lines.append(lines) - -# Load the sympy_printing extension to enable nice printing of sympy expr's. -app.extensions.append('sympy.interactive.ipythonprinting') - diff --git a/IPython/config/profile/README_STARTUP b/IPython/core/profile/README_STARTUP similarity index 100% rename from IPython/config/profile/README_STARTUP rename to IPython/core/profile/README_STARTUP diff --git a/IPython/core/profileapp.py b/IPython/core/profileapp.py index b5b2fdc..38d8ba7 100644 --- a/IPython/core/profileapp.py +++ b/IPython/core/profileapp.py @@ -112,7 +112,7 @@ def list_profiles_in(path): def list_bundled_profiles(): """list profiles that are bundled with IPython.""" - path = os.path.join(get_ipython_package_dir(), u'config', u'profile') + path = os.path.join(get_ipython_package_dir(), u'core', u'profile') files = os.listdir(path) profiles = [] for profile in files: diff --git a/IPython/core/profiledir.py b/IPython/core/profiledir.py index bff81e2..515fad9 100644 --- a/IPython/core/profiledir.py +++ b/IPython/core/profiledir.py @@ -114,7 +114,7 @@ class ProfileDir(LoggingConfigurable): self._mkdir(self.startup_dir) readme = os.path.join(self.startup_dir, 'README') - src = os.path.join(get_ipython_package_dir(), u'config', u'profile', u'README_STARTUP') + src = os.path.join(get_ipython_package_dir(), u'core', u'profile', u'README_STARTUP') if not os.path.exists(src): self.log.warn("Could not copy README_STARTUP to startup dir. Source file %s does not exist.", src) @@ -169,7 +169,7 @@ class ProfileDir(LoggingConfigurable): if os.path.isfile(dst) and not overwrite: return False if path is None: - path = os.path.join(get_ipython_package_dir(), u'config', u'profile', u'default') + path = os.path.join(get_ipython_package_dir(), u'core', u'profile', u'default') src = os.path.join(path, config_file) shutil.copy(src, dst) return True diff --git a/IPython/core/tests/test_profile.py b/IPython/core/tests/test_profile.py index 1939e6d..b20aa0c 100644 --- a/IPython/core/tests/test_profile.py +++ b/IPython/core/tests/test_profile.py @@ -149,9 +149,8 @@ def test_list_profiles_in(): def test_list_bundled_profiles(): # This variable will need to be updated when a new profile gets bundled - bundled_true = [u'cluster', u'math', u'pysh', u'sympy'] bundled = sorted(list_bundled_profiles()) - nt.assert_equal(bundled, bundled_true) + nt.assert_equal(bundled, []) def test_profile_create_ipython_dir(): diff --git a/setupbase.py b/setupbase.py index e7a9c7a..382510a 100644 --- a/setupbase.py +++ b/setupbase.py @@ -183,7 +183,7 @@ def find_package_data(): os.chdir(cwd) package_data = { - 'IPython.config.profile' : ['README*', '*/*.py'], + 'IPython.core' : ['profile/README*'], 'IPython.core.tests' : ['*.png', '*.jpg'], 'IPython.lib.tests' : ['*.wav'], 'IPython.testing.plugin' : ['*.txt'],