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