Skip to content

Commit

Permalink
refactor: simplify coordinates namespace (GalacticDynamics#376)
Browse files Browse the repository at this point in the history
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
  • Loading branch information
nstarman committed Jul 4, 2024
1 parent 30632c1 commit 607b525
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 38 deletions.
18 changes: 13 additions & 5 deletions src/galax/coordinates/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,21 @@
from galax.utils._optional_deps import HAS_GALA

with install_import_hook("galax.coordinates", RUNTIME_TYPECHECKER):
from . import operators
from ._psp import *

from . import _psp # only for __all__
from . import _psp, operators
from ._psp.base import *
from ._psp.base_composite import *
from ._psp.base_psp import *
from ._psp.core import *
from ._psp.interp import *
from ._psp.utils import *

__all__: list[str] = ["operators"]
__all__ += _psp.__all__
__all__ += _psp.base.__all__
__all__ += _psp.base_psp.__all__
__all__ += _psp.base_composite.__all__
__all__ += _psp.core.__all__
__all__ += _psp.interp.__all__
__all__ += _psp.utils.__all__

# Clean up the namespace
del install_import_hook, RUNTIME_TYPECHECKER, HAS_GALA, _psp
11 changes: 0 additions & 11 deletions src/galax/coordinates/__init__.pyi

This file was deleted.

22 changes: 0 additions & 22 deletions src/galax/coordinates/_psp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
"""Phase-space positions."""

from . import (
base,
base_composite,
base_psp,
core,
interp,
operator_compat, # noqa: F401
utils,
)
from .base import *
from .base_composite import *
from .base_psp import *
from .core import *
from .interp import *
from .utils import *

__all__: list[str] = []
__all__ += base.__all__
__all__ += base_psp.__all__
__all__ += base_composite.__all__
__all__ += core.__all__
__all__ += interp.__all__
__all__ += utils.__all__

0 comments on commit 607b525

Please sign in to comment.