##// END OF EJS Templates
Minor edits to reorg.txt.
Brian Granger -
Show More
@@ -1,225 +1,225 b''
1 =============================
1 =============================
2 IPython module reorganization
2 IPython module reorganization
3 =============================
3 =============================
4
4
5 Currently, IPython has many top-level modules that serve many different purposes.
5 Currently, IPython has many top-level modules that serve many different purposes.
6 The lack of organization make it very difficult for developers to work on IPython
6 The lack of organization make it very difficult for developers to work on IPython
7 and understand its design. This document contains notes about how we will reorganize
7 and understand its design. This document contains notes about how we will reorganize
8 the modules into sub-packages.
8 the modules into sub-packages.
9
9
10 .. warning::
10 .. warning::
11
11
12 This effort will possibly break third party packages that use IPython as
12 This effort will possibly break third party packages that use IPython as
13 a library or hack on the IPython internals.
13 a library or hack on the IPython internals.
14
14
15 .. warning::
15 .. warning::
16
16
17 This effort will result in the removal from IPython of certain modules
17 This effort will result in the removal from IPython of certain modules
18 that are not used anymore, don't currently work, are unmaintained, etc.
18 that are not used anymore, don't currently work, are unmaintained, etc.
19
19
20
20
21 Current subpackges
21 Current subpackges
22 ==================
22 ==================
23
23
24 IPython currently has the following sub-packages:
24 IPython currently has the following sub-packages:
25
25
26 * :mod:`IPython.config`
26 * :mod:`IPython.config`
27
27
28 * :mod:`IPython.Extensions`
28 * :mod:`IPython.Extensions`
29
29
30 * :mod:`IPython.external`
30 * :mod:`IPython.external`
31
31
32 * :mod:`IPython.frontend`
32 * :mod:`IPython.frontend`
33
33
34 * :mod:`IPython.gui`
34 * :mod:`IPython.gui`
35
35
36 * :mod:`IPython.kernel`
36 * :mod:`IPython.kernel`
37
37
38 * :mod:`IPython.testing`
38 * :mod:`IPython.testing`
39
39
40 * :mod:`IPython.tests`
40 * :mod:`IPython.tests`
41
41
42 * :mod:`IPython.tools`
42 * :mod:`IPython.tools`
43
43
44 * :mod:`IPython.UserConfig`
44 * :mod:`IPython.UserConfig`
45
45
46 New Subpackages to be created
46 New Subpackages to be created
47 =============================
47 =============================
48
48
49 We propose to create the following new sub-packages:
49 We propose to create the following new sub-packages:
50
50
51 * :mod:`IPython.core`. This sub-package will contain the core of the IPython
51 * :mod:`IPython.core`. This sub-package will contain the core of the IPython
52 interpreter, but none of its extended capabilities.
52 interpreter, but none of its extended capabilities.
53
53
54 * :mod:`IPython.lib`. IPython has many extended capabilities that are not part
54 * :mod:`IPython.lib`. IPython has many extended capabilities that are not part
55 of the IPython core. These things will go here. Any better names than
55 of the IPython core. These things will go here. Any better names than
56 :mod:`IPython.lib`?
56 :mod:`IPython.lib`?
57
57
58 * :mod:`IPython.python`. This sub-package will contain anything that might
58 * :mod:`IPython.python`. This sub-package will contain anything that might
59 eventually be found in the Python standard library, like things in
59 eventually be found in the Python standard library, like things in
60 :mod:`genutils`. Each sub-module in this sub-package should contain functions
60 :mod:`genutils`. Each sub-module in this sub-package should contain functions
61 and classes that serve a single purpose. Similar in purpose to
61 and classes that serve a single purpose. Similar in purpose to
62 :mod:`twisted.python`. Could also call this :mod:`IPython.tools`,
62 :mod:`twisted.python`. Could also call this :mod:`IPython.tools`,
63 :mod:`IPython.utils` or something similar.
63 :mod:`IPython.utils` or something similar.
64
64
65 * :mod:`IPython.sandbox`. This is for code that is untested and/or rotting and
65 * :mod:`IPython.sandbox`. This is for code that is untested and/or rotting and
66 needs to be removed from IPython. Eventually all this code will either i) be
66 needs to be removed from IPython. Eventually all this code will either i) be
67 revived with tests and docs and re-included into IPython or 2) be removed from
67 revived by someone willing to maintain it with tests and docs and
68 IPython proper, but put into a separate top-level (not IPython) package that we
68 re-included into IPython or 2) be removed from IPython proper, but put into
69 keep around.
69 a separate top-level (not IPython) package that we keep around.
70
70
71 Where things will be moved
71 Where things will be moved
72 ==========================
72 ==========================
73
73
74 * :file:`ColorANSI.py`. Move to :file:`IPython/core/coloransi.py`. Maybe move to
74 * :file:`ColorANSI.py`. Move to :file:`IPython/core/coloransi.py`. Maybe move to
75 :mod:`IPython.lib` or :mod:`IPython.python`?
75 :mod:`IPython.lib` or :mod:`IPython.python`?
76
76
77 * :file:`ConfigLoader.py`. Move to :file:`IPython/config/configloader.py`.
77 * :file:`ConfigLoader.py`. Move to :file:`IPython/config/configloader.py`.
78
78
79 * :file:`CrashHandler.py`. Move to :file:`IPython/core/crashhandler`.
79 * :file:`CrashHandler.py`. Move to :file:`IPython/core/crashhandler`.
80
80
81 * :file:`DPyGetOpt.py`. Move to :mod:`IPython.sandbox` and replace with newer options parser.
81 * :file:`DPyGetOpt.py`. Move to :mod:`IPython.sandbox` and replace with newer options parser.
82
82
83 * :file:`Debugger.py`. Move to :file:`IPython/core/debugger.py`.
83 * :file:`Debugger.py`. Move to :file:`IPython/core/debugger.py`.
84
84
85 * :file:`Extensions`. This needs to be gone through separately. Minimally,
85 * :file:`Extensions`. This needs to be gone through separately. Minimally,
86 the package should be renamed to :file:`extensions`.
86 the package should be renamed to :file:`extensions`.
87
87
88 * :file:`FakeModule.py`. Move to :file:`IPython/core/fakemodule.py`.
88 * :file:`FakeModule.py`. Move to :file:`IPython/core/fakemodule.py`.
89
89
90 * :file:`Gnuplot2.py`. Move to :file:`IPython.sandbox`.
90 * :file:`Gnuplot2.py`. Move to :file:`IPython.sandbox`.
91
91
92 * :file:`GnuplotInteractive.py`. Move to :file:`IPython.sandbox`.
92 * :file:`GnuplotInteractive.py`. Move to :file:`IPython.sandbox`.
93
93
94 * :file:`GnuplotRuntime.py`. Move to :file:`IPython.sandbox`.
94 * :file:`GnuplotRuntime.py`. Move to :file:`IPython.sandbox`.
95
95
96 * :file:`Itpl.py`. Remove. Version already in :file:`IPython.external`.
96 * :file:`Itpl.py`. Remove. Version already in :file:`IPython.external`.
97
97
98 * :file:`Logger.py`. Move to :file:`IPython/core/logger.py`.
98 * :file:`Logger.py`. Move to :file:`IPython/core/logger.py`.
99
99
100 * :file:`Magic.py`. Move to :file:`IPython/core/magic.py`.
100 * :file:`Magic.py`. Move to :file:`IPython/core/magic.py`.
101
101
102 * :file:`OInspect.py`. Move to :file:`IPython/core/oinspect.py`.
102 * :file:`OInspect.py`. Move to :file:`IPython/core/oinspect.py`.
103
103
104 * :file:`OutputTrap.py`. Move to :file:`IPython/core/outputtrap.py`.
104 * :file:`OutputTrap.py`. Move to :file:`IPython/core/outputtrap.py`.
105
105
106 * :file:`Prompts.py`. Move to :file:`IPython/core/prompts.py` or
106 * :file:`Prompts.py`. Move to :file:`IPython/core/prompts.py` or
107 :file:`IPython/frontend/prompts.py`.
107 :file:`IPython/frontend/prompts.py`.
108
108
109 * :file:`PyColorize.py`. Replace with pygments? If not, move to
109 * :file:`PyColorize.py`. Replace with pygments? If not, move to
110 :file:`IPython/core/pycolorize.py`. Maybe move to :mod:`IPython.lib` or
110 :file:`IPython/core/pycolorize.py`. Maybe move to :mod:`IPython.lib` or
111 :mod:`IPython.python`?
111 :mod:`IPython.python`?
112
112
113 * :file:`Release.py`. Move to ??? or remove?
113 * :file:`Release.py`. Move to ??? or remove?
114
114
115 * :file:`Shell.py`. Move to :file:`IPython.core.shell.py` or
115 * :file:`Shell.py`. Move to :file:`IPython.core.shell.py` or
116 :file:`IPython/frontend/shell.py`.
116 :file:`IPython/frontend/shell.py`.
117
117
118 * :file:`UserConfig`. Move to a subdirectory of :file:`IPython.config`.
118 * :file:`UserConfig`. Move to a subdirectory of :file:`IPython.config`.
119
119
120 * :file:`background_jobs.py`. Move to :file:`IPython/lib/backgroundjobs.py`.
120 * :file:`background_jobs.py`. Move to :file:`IPython/lib/backgroundjobs.py`.
121
121
122 * :file:`completer.py`. Move to :file:`IPython/core/completer.py`.
122 * :file:`completer.py`. Move to :file:`IPython/core/completer.py`.
123
123
124 * :file:`config`. Good where it is!
124 * :file:`config`. Good where it is!
125
125
126 * :file:`deep_reload.py`. Move to :file:`IPython/lib/deepreload.py`.
126 * :file:`deep_reload.py`. Move to :file:`IPython/lib/deepreload.py`.
127
127
128 * :file:`demo.py`. Move to :file:`IPython/lib/demo.py`.
128 * :file:`demo.py`. Move to :file:`IPython/lib/demo.py`.
129
129
130 * :file:`dtutils.py`. Remove or move to :file:`IPython.testing` or
130 * :file:`dtutils.py`. Remove or move to :file:`IPython.testing` or
131 :file:`IPython.lib`.
131 :file:`IPython.lib`.
132
132
133 * :file:`excolors.py`. Move to :file:`IPython.core` or :file:`IPython.config`.
133 * :file:`excolors.py`. Move to :file:`IPython.core` or :file:`IPython.config`.
134 Maybe move to :mod:`IPython.lib` or :mod:`IPython.python`?
134 Maybe move to :mod:`IPython.lib` or :mod:`IPython.python`?
135
135
136 * :file:`external`. Good where it is!
136 * :file:`external`. Good where it is!
137
137
138 * :file:`frontend`. Good where it is!
138 * :file:`frontend`. Good where it is!
139
139
140 * :file:`generics.py`. Move to :file:`IPython.python`.
140 * :file:`generics.py`. Move to :file:`IPython.python`.
141
141
142 * :file:`genutils.py`. Move to :file:`IPython.python` and break up into different
142 * :file:`genutils.py`. Move to :file:`IPython.python` and break up into different
143 modules.
143 modules.
144
144
145 * :file:`gui`. Eventually this should be moved to a subdir of
145 * :file:`gui`. Eventually this should be moved to a subdir of
146 :file:`IPython.frontend`.
146 :file:`IPython.frontend`.
147
147
148 * :file:`history.py`. Move to :file:`IPython.core`.
148 * :file:`history.py`. Move to :file:`IPython.core`.
149
149
150 * :file:`hooks.py`. Move to :file:`IPython.core`.
150 * :file:`hooks.py`. Move to :file:`IPython.core`.
151
151
152 * :file:`ipapi.py`. Move to :file:`IPython.core`.
152 * :file:`ipapi.py`. Move to :file:`IPython.core`.
153
153
154 * :file:`iplib.py`. Move to :file:`IPython.core`.
154 * :file:`iplib.py`. Move to :file:`IPython.core`.
155
155
156 * :file:`ipmaker.py`: Move to :file:`IPython.core`.
156 * :file:`ipmaker.py`: Move to :file:`IPython.core`.
157
157
158 * :file:`ipstruct.py`. Move to :file:`IPython.python`.
158 * :file:`ipstruct.py`. Move to :file:`IPython.python`.
159
159
160 * :file:`irunner.py`. Move to :file:`IPython.scripts`.
160 * :file:`irunner.py`. Move to :file:`IPython.scripts`.
161
161
162 * :file:`kernel`. Good where it is.
162 * :file:`kernel`. Good where it is.
163
163
164 * :file:`macro.py`. Move to :file:`IPython.core`.
164 * :file:`macro.py`. Move to :file:`IPython.core`.
165
165
166 * :file:`numutils.py`. Move to :file:`IPython.sandbox`.
166 * :file:`numutils.py`. Move to :file:`IPython.sandbox`.
167
167
168 * :file:`platutils.py`. Move to :file:`IPython.python`.
168 * :file:`platutils.py`. Move to :file:`IPython.python`.
169
169
170 * :file:`platutils_dummy.py`. Move to :file:`IPython.python`.
170 * :file:`platutils_dummy.py`. Move to :file:`IPython.python`.
171
171
172 * :file:`platutils_posix.py`. Move to :file:`IPython.python`.
172 * :file:`platutils_posix.py`. Move to :file:`IPython.python`.
173
173
174 * :file:`platutils_win32.py`. Move to :file:`IPython.python`.
174 * :file:`platutils_win32.py`. Move to :file:`IPython.python`.
175
175
176 * :file:`prefilter.py`: Move to :file:`IPython.core`.
176 * :file:`prefilter.py`: Move to :file:`IPython.core`.
177
177
178 * :file:`rlineimpl.py`. Move to :file:`IPython.core`.
178 * :file:`rlineimpl.py`. Move to :file:`IPython.core`.
179
179
180 * :file:`shadowns.py`. Move to :file:`IPython.core`.
180 * :file:`shadowns.py`. Move to :file:`IPython.core`.
181
181
182 * :file:`shellglobals.py`. Move to :file:`IPython.core`.
182 * :file:`shellglobals.py`. Move to :file:`IPython.core`.
183
183
184 * :file:`strdispatch.py`. Move to :file:`IPython.python`.
184 * :file:`strdispatch.py`. Move to :file:`IPython.python`.
185
185
186 * :file:`testing`. Good where it is.
186 * :file:`testing`. Good where it is.
187
187
188 * :file:`tests`. Good where it is.
188 * :file:`tests`. Good where it is.
189
189
190 * :file:`tools`. Things in here need to be looked at and moved elsewhere like
190 * :file:`tools`. Things in here need to be looked at and moved elsewhere like
191 :file:`IPython.python`.
191 :file:`IPython.python`.
192
192
193 * :file:`twshell.py`. Move to :file:`IPython.sandbox`.
193 * :file:`twshell.py`. Move to :file:`IPython.sandbox`.
194
194
195 * :file:`ultraTB.py`. Move to :file:`IPython/core/ultratb.py`.
195 * :file:`ultraTB.py`. Move to :file:`IPython/core/ultratb.py`.
196
196
197 * :file:`upgrade_dir.py`. Move to :file:`IPython/python/upgradedir.py`.
197 * :file:`upgrade_dir.py`. Move to :file:`IPython/python/upgradedir.py`.
198
198
199 * :file:`usage.py`. Move to :file:`IPython.core`.
199 * :file:`usage.py`. Move to :file:`IPython.core`.
200
200
201 * :file:`wildcard.py`. Move to :file:`IPython.python` or :file:`IPython.core`.
201 * :file:`wildcard.py`. Move to :file:`IPython.python` or :file:`IPython.core`.
202
202
203 * :file:`winconsole.py`. Move to :file:`IPython.lib`.
203 * :file:`winconsole.py`. Move to :file:`IPython.lib`.
204
204
205 Other things
205 Other things
206 ============
206 ============
207
207
208 When these files are moved around, a number of other things will happen at the same time:
208 When these files are moved around, a number of other things will happen at the same time:
209
209
210 1. Test files will be created for each module in IPython. Minimally, all
210 1. Test files will be created for each module in IPython. Minimally, all
211 modules will be imported as a part of the test. This will serve as a
211 modules will be imported as a part of the test. This will serve as a
212 test of the module reorganization. These tests will be put into new
212 test of the module reorganization. These tests will be put into new
213 :file:`tests` subdirectories that each package will have.
213 :file:`tests` subdirectories that each package will have.
214
214
215 2. PyFlakes and other code checkers will be run to look for problems.
215 2. PyFlakes and other code checkers will be run to look for problems.
216
216
217 3. Modules will be renamed to comply with PEP 8 naming conventions: all
217 3. Modules will be renamed to comply with PEP 8 naming conventions: all
218 lowercase and no special characters like ``-`` or ``_``.
218 lowercase and no special characters like ``-`` or ``_``.
219
219
220 4. Existing tests will be moved to the appropriate :file:`tests`
220 4. Existing tests will be moved to the appropriate :file:`tests`
221 subdirectories.
221 subdirectories.
222
222
223
223
224
224
225
225
General Comments 0
You need to be logged in to leave comments. Login now