diff --git a/odl/__init__.py b/odl/__init__.py index 57fc7829f4f..a69c4f115bf 100644 --- a/odl/__init__.py +++ b/odl/__init__.py @@ -15,26 +15,38 @@ from __future__ import absolute_import __version__ = '0.6.1.dev0' -__all__ = ('diagnostics', 'discr', 'operator', 'set', 'space', 'solvers', - 'tomo', 'trafos', 'util', 'phantom', 'deform', 'ufunc_ops', - 'datasets', 'contrib') - -# Propagate names defined in __all__ of all submodules into the top-level -# module +__all__ = ('set', + 'space', + 'operator', + 'discr', + 'contrib', + 'deform', + 'diagnostics', + 'phantom', + 'solvers', + 'tomo', + 'trafos', + 'ufunc_ops', + 'util', + ) + +# Propagate names defined in` __all__` of all "core" subpackages into +# the top-level namespace from .set import * __all__ += set.__all__ -# operator must come before space because fspace imports Operator -from .operator import * -__all__ += operator.__all__ - from .space import * __all__ += space.__all__ +from .operator import * +__all__ += operator.__all__ + from .discr import * __all__ += discr.__all__ -from . import datasets +# More "advanced" subpackages keep their namespaces separate from top-level, +# we only import the modules themselves +from . import contrib from . import deform from . import diagnostics from . import phantom @@ -42,9 +54,8 @@ from . import tomo from . import trafos from . import ufunc_ops -from . import contrib - from . import util +# Add `test` function to global namespace so users can run `odl.test()` from .util import test __all__ += ('test',)