Browse files

Incr. micro version number. New style importing hooks will follow soo…

…n (see DEVELOPERS.txt).
  • Loading branch information...
1 parent 6a1c757 commit 9073df199fda9279a7e3561f47c82a351a8d742d @pearu pearu committed Oct 22, 2003
Showing with 39 additions and 43 deletions.
  1. +32 −40 DEVELOPERS.txt
  2. +7 −3 Lib/
@@ -58,7 +58,8 @@ Currently Scipy consists of the following files and directories:
Contains packages related to Chaco. [Can we move these packages
- under Lib/?]
+ under Lib/? No need, new hooks in takes care of this; in
+ fact, we can introduce also contrib/ directory]
Scipy tutorial.
@@ -84,29 +85,25 @@ follow the following conventions:
* Directory ``xxx/`` must contain
+ a file ```` that defines
- ``configuration(parent_package='')`` function. See ... for more
+ ``configuration(parent_package='')`` function. See below for more
- + a file ````. See .. more details.
+ + a file ````. See below more details.
* Directory ``xxx/`` may contain
+ a directory ``tests/`` that contains files ``test_<name>.py``
- corresponding to modules ``xxx/<name>{.py,.so,/}``. See ... for
+ corresponding to modules ``xxx/<name>{.py,.so,/}``. See below for
more details.
+ a file ````.
- + a file ```` that should contain the documentation
- string of the module, usually found in ```` file. See
- ... for more details.
[Open issues: where we should put documentation?]
File xxx/
-Each Scipy module file must contain a function
+Each Scipy module file should contain a function
``configuration(..)`` that returns a dictionary which must be usable
as an argument to distutils setup function.
@@ -123,37 +120,30 @@ module xxx is::
from scipy_distutils.core import setup
-Files xxx/ and xxx/
+File xxx/
To speed up the import time as well as to minimize memory usage, scipy
uses ppimport hooks to transparently postpone importing large modules
that might not be used during a Scipy usage session. But in order to
have an access to documentation of all Scipy modules, including of the
postponed modules, the documentation string of a module (that would
-usually reside in file) must be moved to
+usually reside in file) should be copied also
+to file.
-So, the contents of a typical xxx/ file is::
+So, the contents of a typical xxx/ file would be::
# Module xxx - ...
- from pre___init__ import __doc__
- #from info_xxx import __doc__
+ from info_xxx import __doc__
-[xxx/ functionality will be replaced with more general
-hooks in xxx/ file]
File xxx/
-[ functionality is not implemented in Scipy yet.]
Scipy and Lib/ files assume that each Scipy module
contains a file. The following information will be looked
from this file:
@@ -170,28 +160,36 @@ standalone
as standalone or under scipy. Default value is False.
+ [Support not implemented yet, may be it is YAGNI]
List of module names that the module depends on. The module will not
be installed if any of the dependencies is missing. If the module
depends on another Scipy module, say yyy, and that is not going to
be installed standalone, then use full name, that is, ``scipy.yyy``
instead of ``yyy``.
List of names that should be imported to scipy name space.
Boolean variable indicating that the module should be ignored or
not. Default value is False. Useful when the module is platform
+ Boolean variable indicating that importing module should be
+ postponed until first attempt of its usage. Default value is False.
File xxx/tests/
Ideally, each Python code, extension module, or a subpackage in ``xxx/``
directory should have the corresponding ``test_<name>.py`` file in
-``xxx/tests/`` directory. This file should define a function
-``test_suite_list`` that must return a list of 2-tuples
-``(<ScipyTestCase class>, <method name pattern>)``.
+``xxx/tests/`` directory. This file should define classes derived
+from ScipyTestCase class. Methods of such classes that names start
+with ``bench_`` or ``check_`` or ``test_`` are passed on to unittest
+machinery. These methods may have optional arguments, the default
+value of the first argument defines the testing level number. Default
+level is 1.
A minimal example of a ```` file that implements tests for
a module ``xxx.yyy`` containing a function ``zzz()``, is shown below::
@@ -205,25 +203,13 @@ a module ``xxx.yyy`` containing a function ``zzz()``, is shown below::
del sys.path[0]
class test_zzz(ScipyTestCase):
- def check_simple(self):
+ def check_simple(self, level=1):
assert zzz()=='Hello from zzz'
- # defining test_suite_list function is obligatory
- def test_suite_list(level=1):
- suite_list = []
- if level > 0:
- suite_list += [
- (test_zzz,'check_'),
- #...
- ]
- if level > 5:
- #...
- return suite_list
if __name__ == "__main__":
from scipy_test.testing import ScipyTest
- ScipyTest('xxx.yyy').test(level=1,verbosity=2)
+ ScipyTest('xxx.yyy').run()
``ScipyTestCase`` is derived from ``unittest.TestCase`` and it
implements additional method ``measure(self, code_str, times=1)``.
@@ -237,3 +223,9 @@ functions::
rand(*shape) # returns random array with a given shape
+``ScipyTest`` managed running ``tests/test_*.py`` scripts. When using
+its ``.run()`` method then the level and verbosity parameters for
+tests are taken from ``sys.argv`` and the method
+``.test(level,verbosity)`` is called.
@@ -1,12 +1,16 @@
major = 0
minor = 2
-micro = 0
+micro = 1
#release_level = 'alpha'
from __cvs_version__ import cvs_version
cvs_minor = cvs_version[-3]
cvs_serial = cvs_version[-1]
-scipy_version = '%(major)d.%(minor)d.%(micro)d_%(release_level)s'\
- '_%(cvs_minor)d.%(cvs_serial)d' % (locals ())
+if release_level:
+ scipy_version = '%(major)d.%(minor)d.%(micro)d_%(release_level)s'\
+ '_%(cvs_minor)d.%(cvs_serial)d' % (locals ())
+ scipy_version = '%(major)d.%(minor)d.%(micro)d'\
+ '_%(cvs_minor)d.%(cvs_serial)d' % (locals ())

0 comments on commit 9073df1

Please sign in to comment.