[SciPy-dev] Some concerns on Scipy development
pearu at cens.ioc.ee
Tue Mar 26 02:30:36 CST 2002
I have some concerns about how different Scipy modules are dependent on
each other by a global scipy namespace, though there is often little need
for this dependency. Namely, most of the current modules import scipy and
as result one can say that effectively all modules import each other. Such
a policy is not good because of the following reasons:
1) It is generally a good style of programming if a module imports only
thouse resources that it actually uses. This helps, for example, in
localizing and fixing bugs in a particular module level, which will be
much easier when doing it in a global scipy level.
Testing routines should be particullary careful not importing
irrelevant modules, escpecially, if these are also under testing.
For a particular example, many modules import MLab or scipy just to
access only the resources in Numeric. I would remove all such imports in
favour of importing Numeric directly.
2) There has been wished (see numpy-discussion list) that scipy wouldn't
be such a big monolitic environment. Instead, it should be possible to
install Scipy subpackages as standalone packages if that is possible in
principle. It has an advantage that other projects could use parts of
Scipy codes without actually building the whole scipy.
Or is this the Scipy policy to force installing/using either the whole
scipy package or nothing from it? I think that then some experts will not
use scipy at all (also I find it less stimulating to contribute to
3) The idea of different levels in SciPy is not working if the lowest
level modules import everything. It would be less confusing to drop the
idea of leveling from start -- I am not proposing to acctually go for it.
Instead, as I see it, Scipy should be rather thin interface between an
user and modules that it provides, with some additional (high
level) convinience functions (that may import "everything"). Lower level
modules should not depend each other unless there is a good reason for
I wonder how other Scipy developers feel about these issues?
Do you think that my concerns are somehow relevant or not?
Is it acceptable trying gradually to turn lower level modules to be
independent from each other if possible?
More information about the Scipy-dev