##// END OF EJS Templates
Moving dtutils.py to deathrow....
Brian Granger -
Show More
1 NO CONTENT: file renamed from IPython/dtutils.py to IPython/deathrow/dtutils.py
NO CONTENT: file renamed from IPython/dtutils.py to IPython/deathrow/dtutils.py
@@ -1,245 +1,248 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.utils`. This sub-package will contain anything that might
58 * :mod:`IPython.utils`. 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
60 :mod:`genutils`. Each sub-module in this sub-package should contain
61 functions and classes that serve a single purpose.
61 functions and classes that serve a single purpose.
62
62
63 * :mod:`IPython.deathrow`. This is for code that is untested and/or rotting
63 * :mod:`IPython.deathrow`. This is for code that is untested and/or rotting
64 and needs to be removed from IPython. Eventually all this code will either
64 and needs to be removed from IPython. Eventually all this code will either
65 i) be revived by someone willing to maintain it with tests and docs and
65 i) be revived by someone willing to maintain it with tests and docs and
66 re-included into IPython or 2) be removed from IPython proper, but put into
66 re-included into IPython or 2) be removed from IPython proper, but put into
67 a separate top-level (not IPython) package that we keep around. No new code
67 a separate top-level (not IPython) package that we keep around. No new code
68 will be allowed here.
68 will be allowed here.
69
69
70 * :mod:`IPython.quarantine`. This is for code that doesn't meet IPython's
70 * :mod:`IPython.quarantine`. This is for code that doesn't meet IPython's
71 standards, but that we plan on keeping. To be moved out of this sub-package
71 standards, but that we plan on keeping. To be moved out of this sub-package
72 a module needs to have a maintainer, tests and documentation.
72 a module needs to have a maintainer, tests and documentation.
73
73
74 Prodecure
74 Prodecure
75 =========
75 =========
76
76
77 1. Move the file to its new location with its new name.
77 1. Move the file to its new location with its new name.
78 2. Rename all import statements to reflect the change.
78 2. Rename all import statements to reflect the change.
79 3. Run PyFlakes on each changes module.
79 3. Run PyFlakes on each changes module.
80 3. Add tests/test_imports.py to test it.
80 3. Add tests/test_imports.py to test it.
81
81
82 Need to modify iptests to properly skip modules that are no longer top
82 Need to modify iptests to properly skip modules that are no longer top
83 level modules.
83 level modules.
84
84
85 Need to update the top level IPython/__init__.py file.
85 Need to update the top level IPython/__init__.py file.
86
86
87 Where things will be moved
87 Where things will be moved
88 ==========================
88 ==========================
89
89
90 * :file:`background_jobs.py`. Move to :file:`IPython/lib/backgroundjobs.py`.
90 * :file:`background_jobs.py`. Move to :file:`IPython/lib/backgroundjobs.py`.
91
91
92 * :file:`ColorANSI.py`. Move to :file:`IPython/utils/coloransi.py`.
92 * :file:`ColorANSI.py`. Move to :file:`IPython/utils/coloransi.py`.
93
93
94 * :file:`completer.py`. Move to :file:`IPython/core/completer.py`.
94 * :file:`completer.py`. Move to :file:`IPython/core/completer.py`.
95
95
96 * :file:`ConfigLoader.py`. Move to :file:`IPython/config/configloader.py`.
96 * :file:`ConfigLoader.py`. Move to :file:`IPython/config/configloader.py`.
97
97
98 * :file:`CrashHandler.py`. Move to :file:`IPython/core/crashhandler`.
98 * :file:`CrashHandler.py`. Move to :file:`IPython/core/crashhandler`.
99
99
100 * :file:`Debugger.py`. Move to :file:`IPython/core/debugger.py`.
100 * :file:`Debugger.py`. Move to :file:`IPython/core/debugger.py`.
101
101
102 * :file:`deep_reload.py`. Move to :file:`IPython/lib/deepreload.py`.
102 * :file:`deep_reload.py`. Move to :file:`IPython/lib/deepreload.py`.
103
103
104 * :file:`demo.py`. Move to :file:`IPython/lib/demo.py`.
104 * :file:`demo.py`. Move to :file:`IPython/lib/demo.py`.
105
105
106 * :file:`DPyGetOpt.py`. Move to :mod:`IPython.utils` and replace with newer options parser.
106 * :file:`DPyGetOpt.py`. Move to :mod:`IPython.utils` and replace with newer options parser.
107
107
108 * :file:`dtutils.py`. Remove or move to :file:`IPython.testing` or
109 :file:`IPython.lib`.
110
111
112
108 * :file:`Extensions`. This needs to be gone through separately. Minimally,
113 * :file:`Extensions`. This needs to be gone through separately. Minimally,
109 the package should be renamed to :file:`extensions`.
114 the package should be renamed to :file:`extensions`.
110
115
111 * :file:`FakeModule.py`. Move to :file:`IPython/core/fakemodule.py`.
116 * :file:`FakeModule.py`. Move to :file:`IPython/core/fakemodule.py`.
112
117
113 * :file:`Gnuplot2.py`. Move to :file:`IPython.sandbox`.
118 * :file:`Gnuplot2.py`. Move to :file:`IPython.sandbox`.
114
119
115 * :file:`GnuplotInteractive.py`. Move to :file:`IPython.sandbox`.
120 * :file:`GnuplotInteractive.py`. Move to :file:`IPython.sandbox`.
116
121
117 * :file:`GnuplotRuntime.py`. Move to :file:`IPython.sandbox`.
122 * :file:`GnuplotRuntime.py`. Move to :file:`IPython.sandbox`.
118
123
119 * :file:`Itpl.py`. Remove. Version already in :file:`IPython.external`.
124 * :file:`Itpl.py`. Remove. Version already in :file:`IPython.external`.
120
125
121 * :file:`Logger.py`. Move to :file:`IPython/core/logger.py`.
126 * :file:`Logger.py`. Move to :file:`IPython/core/logger.py`.
122
127
123 * :file:`Magic.py`. Move to :file:`IPython/core/magic.py`.
128 * :file:`Magic.py`. Move to :file:`IPython/core/magic.py`.
124
129
125 * :file:`OInspect.py`. Move to :file:`IPython/core/oinspect.py`.
130 * :file:`OInspect.py`. Move to :file:`IPython/core/oinspect.py`.
126
131
127 * :file:`OutputTrap.py`. Move to :file:`IPython/core/outputtrap.py`.
132 * :file:`OutputTrap.py`. Move to :file:`IPython/core/outputtrap.py`.
128
133
129 * :file:`Prompts.py`. Move to :file:`IPython/core/prompts.py` or
134 * :file:`Prompts.py`. Move to :file:`IPython/core/prompts.py` or
130 :file:`IPython/frontend/prompts.py`.
135 :file:`IPython/frontend/prompts.py`.
131
136
132 * :file:`PyColorize.py`. Replace with pygments? If not, move to
137 * :file:`PyColorize.py`. Replace with pygments? If not, move to
133 :file:`IPython/core/pycolorize.py`. Maybe move to :mod:`IPython.lib` or
138 :file:`IPython/core/pycolorize.py`. Maybe move to :mod:`IPython.lib` or
134 :mod:`IPython.python`?
139 :mod:`IPython.python`?
135
140
136 * :file:`Release.py`. Move to ??? or remove?
141 * :file:`Release.py`. Move to ??? or remove?
137
142
138 * :file:`Shell.py`. Move to :file:`IPython.core.shell.py` or
143 * :file:`Shell.py`. Move to :file:`IPython.core.shell.py` or
139 :file:`IPython/frontend/shell.py`.
144 :file:`IPython/frontend/shell.py`.
140
145
141 * :file:`UserConfig`. Move to a subdirectory of :file:`IPython.config`.
146 * :file:`UserConfig`. Move to a subdirectory of :file:`IPython.config`.
142
147
143
148
144
149
145
150
146 * :file:`config`. Good where it is!
151 * :file:`config`. Good where it is!
147
152
148
153
149
154
150 * :file:`dtutils.py`. Remove or move to :file:`IPython.testing` or
151 :file:`IPython.lib`.
152
155
153 * :file:`excolors.py`. Move to :file:`IPython.core` or :file:`IPython.config`.
156 * :file:`excolors.py`. Move to :file:`IPython.core` or :file:`IPython.config`.
154 Maybe move to :mod:`IPython.lib` or :mod:`IPython.python`?
157 Maybe move to :mod:`IPython.lib` or :mod:`IPython.python`?
155
158
156 * :file:`external`. Good where it is!
159 * :file:`external`. Good where it is!
157
160
158 * :file:`frontend`. Good where it is!
161 * :file:`frontend`. Good where it is!
159
162
160 * :file:`generics.py`. Move to :file:`IPython.python`.
163 * :file:`generics.py`. Move to :file:`IPython.python`.
161
164
162 * :file:`genutils.py`. Move to :file:`IPython.python` and break up into different
165 * :file:`genutils.py`. Move to :file:`IPython.python` and break up into different
163 modules.
166 modules.
164
167
165 * :file:`gui`. Eventually this should be moved to a subdir of
168 * :file:`gui`. Eventually this should be moved to a subdir of
166 :file:`IPython.frontend`.
169 :file:`IPython.frontend`.
167
170
168 * :file:`history.py`. Move to :file:`IPython.core`.
171 * :file:`history.py`. Move to :file:`IPython.core`.
169
172
170 * :file:`hooks.py`. Move to :file:`IPython.core`.
173 * :file:`hooks.py`. Move to :file:`IPython.core`.
171
174
172 * :file:`ipapi.py`. Move to :file:`IPython.core`.
175 * :file:`ipapi.py`. Move to :file:`IPython.core`.
173
176
174 * :file:`iplib.py`. Move to :file:`IPython.core`.
177 * :file:`iplib.py`. Move to :file:`IPython.core`.
175
178
176 * :file:`ipmaker.py`: Move to :file:`IPython.core`.
179 * :file:`ipmaker.py`: Move to :file:`IPython.core`.
177
180
178 * :file:`ipstruct.py`. Move to :file:`IPython.python`.
181 * :file:`ipstruct.py`. Move to :file:`IPython.python`.
179
182
180 * :file:`irunner.py`. Move to :file:`IPython.scripts`.
183 * :file:`irunner.py`. Move to :file:`IPython.scripts`.
181
184
182 * :file:`kernel`. Good where it is.
185 * :file:`kernel`. Good where it is.
183
186
184 * :file:`macro.py`. Move to :file:`IPython.core`.
187 * :file:`macro.py`. Move to :file:`IPython.core`.
185
188
186 * :file:`numutils.py`. Move to :file:`IPython.sandbox`.
189 * :file:`numutils.py`. Move to :file:`IPython.sandbox`.
187
190
188 * :file:`platutils.py`. Move to :file:`IPython.python`.
191 * :file:`platutils.py`. Move to :file:`IPython.python`.
189
192
190 * :file:`platutils_dummy.py`. Move to :file:`IPython.python`.
193 * :file:`platutils_dummy.py`. Move to :file:`IPython.python`.
191
194
192 * :file:`platutils_posix.py`. Move to :file:`IPython.python`.
195 * :file:`platutils_posix.py`. Move to :file:`IPython.python`.
193
196
194 * :file:`platutils_win32.py`. Move to :file:`IPython.python`.
197 * :file:`platutils_win32.py`. Move to :file:`IPython.python`.
195
198
196 * :file:`prefilter.py`: Move to :file:`IPython.core`.
199 * :file:`prefilter.py`: Move to :file:`IPython.core`.
197
200
198 * :file:`rlineimpl.py`. Move to :file:`IPython.core`.
201 * :file:`rlineimpl.py`. Move to :file:`IPython.core`.
199
202
200 * :file:`shadowns.py`. Move to :file:`IPython.core`.
203 * :file:`shadowns.py`. Move to :file:`IPython.core`.
201
204
202 * :file:`shellglobals.py`. Move to :file:`IPython.core`.
205 * :file:`shellglobals.py`. Move to :file:`IPython.core`.
203
206
204 * :file:`strdispatch.py`. Move to :file:`IPython.python`.
207 * :file:`strdispatch.py`. Move to :file:`IPython.python`.
205
208
206 * :file:`testing`. Good where it is.
209 * :file:`testing`. Good where it is.
207
210
208 * :file:`tests`. Good where it is.
211 * :file:`tests`. Good where it is.
209
212
210 * :file:`tools`. Things in here need to be looked at and moved elsewhere like
213 * :file:`tools`. Things in here need to be looked at and moved elsewhere like
211 :file:`IPython.python`.
214 :file:`IPython.python`.
212
215
213 * :file:`twshell.py`. Move to :file:`IPython.sandbox`.
216 * :file:`twshell.py`. Move to :file:`IPython.sandbox`.
214
217
215 * :file:`ultraTB.py`. Move to :file:`IPython/core/ultratb.py`.
218 * :file:`ultraTB.py`. Move to :file:`IPython/core/ultratb.py`.
216
219
217 * :file:`upgrade_dir.py`. Move to :file:`IPython/python/upgradedir.py`.
220 * :file:`upgrade_dir.py`. Move to :file:`IPython/python/upgradedir.py`.
218
221
219 * :file:`usage.py`. Move to :file:`IPython.core`.
222 * :file:`usage.py`. Move to :file:`IPython.core`.
220
223
221 * :file:`wildcard.py`. Move to :file:`IPython.python` or :file:`IPython.core`.
224 * :file:`wildcard.py`. Move to :file:`IPython.python` or :file:`IPython.core`.
222
225
223 * :file:`winconsole.py`. Move to :file:`IPython.lib`.
226 * :file:`winconsole.py`. Move to :file:`IPython.lib`.
224
227
225 Other things
228 Other things
226 ============
229 ============
227
230
228 When these files are moved around, a number of other things will happen at the same time:
231 When these files are moved around, a number of other things will happen at the same time:
229
232
230 1. Test files will be created for each module in IPython. Minimally, all
233 1. Test files will be created for each module in IPython. Minimally, all
231 modules will be imported as a part of the test. This will serve as a
234 modules will be imported as a part of the test. This will serve as a
232 test of the module reorganization. These tests will be put into new
235 test of the module reorganization. These tests will be put into new
233 :file:`tests` subdirectories that each package will have.
236 :file:`tests` subdirectories that each package will have.
234
237
235 2. PyFlakes and other code checkers will be run to look for problems.
238 2. PyFlakes and other code checkers will be run to look for problems.
236
239
237 3. Modules will be renamed to comply with PEP 8 naming conventions: all
240 3. Modules will be renamed to comply with PEP 8 naming conventions: all
238 lowercase and no special characters like ``-`` or ``_``.
241 lowercase and no special characters like ``-`` or ``_``.
239
242
240 4. Existing tests will be moved to the appropriate :file:`tests`
243 4. Existing tests will be moved to the appropriate :file:`tests`
241 subdirectories.
244 subdirectories.
242
245
243
246
244
247
245
248
General Comments 0
You need to be logged in to leave comments. Login now