diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
index db499976..a6c1c63c 100644
--- a/.github/workflows/cd.yml
+++ b/.github/workflows/cd.yml
@@ -30,6 +30,11 @@ jobs:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2
+ with:
+ path: packages/galax
+ upload-name-suffix: "-galax"
+
+ # TODO: also galax-interop-astropy and galax-interop-gala
test-publish:
needs: [dist]
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 847186ba..f22120b8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -47,7 +47,7 @@ jobs:
with:
python-version: "3.x"
- name: Install package
- run: python -m pip install ".[test]"
+ run: python -m pip install "./packages/galax[test]"
- name: Run smoke test
run: python -m pytest tests/smoke -ra
@@ -79,6 +79,7 @@ jobs:
- name: Install package
run: python -m pip install '.[test]'
+ # run: python -m pip install './packages/galax[test]'
- name: Test package
run: >-
@@ -112,7 +113,10 @@ jobs:
allow-prereleases: true
- name: Install package
- run: python -m pip install '.[test,interop-all]'
+ run:
+ python -m pip install './packages/galax[test]'
+ './packages/galax_interop_astropy' './packages/galax_interop_gala'
+ # run: python -m pip install '.[test]'
- name: Test package
run: >-
diff --git a/.gitignore b/.gitignore
index 37093200..172dbd76 100644
--- a/.gitignore
+++ b/.gitignore
@@ -138,6 +138,7 @@ dmypy.json
cython_debug/
# setuptools_scm
+src/_version.py
src/*/_version.py
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index fe070eb6..b7b19f3f 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -55,6 +55,7 @@ repos:
hooks:
# Run the linter
- id: ruff
+ name: ruff-lint
types_or: [python, pyi, jupyter]
args: ["--fix", "--show-fixes"]
# Run the formatter
@@ -79,7 +80,7 @@ repos:
hooks:
- id: mypy
files: src
- exclude: ^(src/galax/__init__\.py|src/galax/.*?/__init__\.py)$
+ exclude: ^(src/galax_suite/galax/.*?/__init__\.py)$
additional_dependencies:
- pytest
diff --git a/conftest.py b/conftest.py
index bbb483bf..e1fa4aa3 100644
--- a/conftest.py
+++ b/conftest.py
@@ -24,6 +24,6 @@
collect_ignore_glob = []
if not HAS_ASTROPY:
- collect_ignore_glob.append("src/galax/_galax_interop_astropy/*")
+ collect_ignore_glob.append("src/galax_interop_astropy/*")
if not HAS_GALA:
- collect_ignore_glob.append("src/galax/_galax_interop_gala/*")
+ collect_ignore_glob.append("src/galax_interop_gala/*")
diff --git a/packages/galax/LICENSE b/packages/galax/LICENSE
new file mode 100644
index 00000000..90ca9c1c
--- /dev/null
+++ b/packages/galax/LICENSE
@@ -0,0 +1,19 @@
+Copyright 2023 galax maintainers
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/packages/galax/README.md b/packages/galax/README.md
new file mode 100644
index 00000000..90d583e1
--- /dev/null
+++ b/packages/galax/README.md
@@ -0,0 +1,116 @@
+
galax
+Galactic and Gravitational Dynamics
+
+## Installation
+
+[![PyPI platforms][pypi-platforms]][pypi-link]
+[![PyPI version][pypi-version]][pypi-link]
+
+
+
+```bash
+pip install galax
+```
+
+## Documentation
+
+[![Documentation Status][rtd-badge]][rtd-link]
+
+Coming soon. In the meantime, if you've used `gala`, then `galax` should be
+familiar!
+
+## Quick example
+
+Let's compute an orbit!
+
+```python
+import coordinax as cx
+import galax.coordinates as gc
+import galax.dynamics as gd
+import galax.potential as gp
+import jax.numpy as jnp
+from unxt import Quantity
+
+w = gc.PhaseSpacePosition(
+ q=Quantity([8, 0, 0], "kpc"),
+ p=Quantity([0, 220, 0], "km/s"),
+ t=Quantity(0, "Myr"),
+)
+
+pot = gp.MilkyWayPotential()
+
+orbit = gd.evaluate_orbit(pot, w, Quantity(jnp.linspace(0, 1, 100), "Gyr"))
+print(orbit)
+# Orbit(
+# q=,
+# p=,
+# t=Quantity['time'](Array([0., ..., 1000.], dtype=float64), unit='Myr'),
+# potential=MilkyWayPotential(...)
+# )
+
+orbit_sph = orbit.represent_as(cx.LonLatSphericalPosition)
+print(orbit_sph)
+# Orbit(
+# q=,
+# p=,
+# t=Quantity['time'](Array([0., ..., 1000.], dtype=float64), unit='Myr'),
+# potential=MilkyWayPotential(...})
+# )
+```
+
+## Citation
+
+[![DOI][zenodo-badge]][zenodo-link]
+
+If you found this library to be useful in academic work, then please cite.
+
+## Development
+
+[![Actions Status][actions-badge]][actions-link]
+
+We welcome contributions!
+
+### Contributors
+
+See the
+[AUTHORS.rst](https://github.com/GalacticDynamics/galax/blob/main/AUTHORS.rst)
+file for a complete list of contributors to the project.
+
+The [`GalacticDynamics/galax`](https://github.com/GalacticDynamics/galax)
+maintainers would like to thank
+[@Michael Anckaert](https://github.com/MichaelAnckaert) for transferring the
+`galax` project domain on `PyPI` for use by this package. Without his generosity
+this package would have had a worse name.
+
+
+
+
+[actions-badge]: https://github.com/GalacticDynamics/galax/workflows/CI/badge.svg
+[actions-link]: https://github.com/GalacticDynamics/galax/actions
+[codecov-badge]: https://codecov.io/gh/GalacticDynamics/galax/graph/badge.svg?token=PC553LZFFJ
+[codecov-link]: https://codecov.io/gh/GalacticDynamics/galax
+[conda-badge]: https://img.shields.io/conda/vn/conda-forge/galax
+[conda-link]: https://github.com/conda-forge/galax-feedstock
+[github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
+[github-discussions-link]: https://github.com/GalacticDynamics/galax/discussions
+[pypi-link]: https://pypi.org/project/galax/
+[pypi-platforms]: https://img.shields.io/pypi/pyversions/galax
+[pypi-version]: https://img.shields.io/pypi/v/galax
+[rtd-badge]: https://readthedocs.org/projects/galax/badge/?version=latest
+[rtd-link]: https://galax.readthedocs.io/en/latest/?badge=latest
+[zenodo-badge]: https://zenodo.org/badge/706347349.svg
+[zenodo-link]: https://zenodo.org/doi/10.5281/zenodo.11553324
+
+
diff --git a/packages/galax/pyproject.toml b/packages/galax/pyproject.toml
new file mode 100644
index 00000000..a0a4d047
--- /dev/null
+++ b/packages/galax/pyproject.toml
@@ -0,0 +1,94 @@
+[build-system]
+build-backend = "hatchling.build"
+requires = ["hatchling", "hatch-vcs"]
+
+
+[project]
+authors = [
+ { name = "galax maintainers", email = "nstarman@users.noreply.github.com" },
+ { name = "Jake Nibauer", email = "jnibauer@princeton.edu" },
+ { name = "Adrian Price-Whelan", email = "adrianmpw@gmail.com" },
+ { name = "Nathaniel Starkman", email = "nstarman@users.noreply.github.com" },
+]
+classifiers = [
+ "Development Status :: 1 - Planning",
+ "Intended Audience :: Science/Research",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3 :: Only",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
+ "Topic :: Scientific/Engineering",
+ "Typing :: Typed",
+]
+dependencies = [
+ "astropy >= 6.0",
+ "beartype >= 0.18",
+ "coordinax >= 0.7",
+ "diffrax >= 0.5",
+ "equinox >=0.11, != 0.11.3",
+ "jax >= 0.4, != 0.4.27",
+ "jaxlib != 0.4.27",
+ "lazy_loader >= 0.4",
+ "packaging", # for optional dependencies
+ "quax >= 0.0.3",
+ "quaxed >= 0.4",
+ "typing_extensions >= 4.11",
+ "unxt",
+ # Temporary
+ "plum-dispatch < 2.4.2",
+]
+description = "Galactic Dynamics in Jax."
+dynamic = ["version"]
+name = "galax"
+readme = "README.md"
+license.file = "LICENSE"
+requires-python = ">=3.11"
+
+[project.optional-dependencies]
+# All runtime dependencies
+all = ["galax[interop-all]"]
+# Interoperability dependencies
+interop-all = ["galax-interop-astropy", "galax-interop-gala"]
+test = [
+ # "hypothesis[numpy]",
+ "nox",
+ "pre-commit",
+ "pytest >=6",
+ "pytest-cov >=3",
+ "pytest-arraydiff",
+ "sybil",
+]
+
+[project.urls]
+"Bug Tracker" = "https://github.com/GalacticDynamics/galax/issues"
+Changelog = "https://github.com/GalacticDynamics/galax/releases"
+Discussions = "https://github.com/GalacticDynamics/galax/discussions"
+Homepage = "https://github.com/GalacticDynamics/galax"
+
+
+[tool.hatch]
+metadata.allow-direct-references = true
+version.source = "vcs"
+version.raw-options.root = "../.."
+
+[tool.hatch.envs.default]
+dependencies = ["pytest", "pytest-cov"]
+features = ["test"]
+scripts.test = "pytest {args}"
+
+[tool.hatch.build]
+directory = "../../dist"
+# hooks.vcs.version-file = "../../src/galax_suite/galax/_version.py"
+
+[tool.hatch.build.targets.sdist]
+exclude = ["pyproject.toml"]
+
+[tool.hatch.build.targets.sdist.force-include]
+"../../src/galax_suite/galax" = "galax"
+
+[tool.hatch.build.targets.wheel.force-include]
+"../../src/galax_suite/galax" = "galax"
diff --git a/packages/galax_interop_astropy/LICENSE b/packages/galax_interop_astropy/LICENSE
new file mode 100644
index 00000000..90ca9c1c
--- /dev/null
+++ b/packages/galax_interop_astropy/LICENSE
@@ -0,0 +1,19 @@
+Copyright 2023 galax maintainers
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/packages/galax_interop_astropy/README.md b/packages/galax_interop_astropy/README.md
new file mode 100644
index 00000000..9ed74609
--- /dev/null
+++ b/packages/galax_interop_astropy/README.md
@@ -0,0 +1,4 @@
+ galax-interop-astropy
+Galactic and Gravitational Dynamics
+
+Galax interoperability with Astropy.
diff --git a/packages/galax_interop_astropy/pyproject.toml b/packages/galax_interop_astropy/pyproject.toml
new file mode 100644
index 00000000..03067d3b
--- /dev/null
+++ b/packages/galax_interop_astropy/pyproject.toml
@@ -0,0 +1,60 @@
+[build-system]
+build-backend = "hatchling.build"
+requires = ["hatchling", "hatch-vcs"]
+
+
+[project]
+authors = [
+ { name = "galax maintainers", email = "nstarman@users.noreply.github.com" },
+ { name = "Jake Nibauer", email = "jnibauer@princeton.edu" },
+ { name = "Adrian Price-Whelan", email = "adrianmpw@gmail.com" },
+ { name = "Nathaniel Starkman", email = "nstarman@users.noreply.github.com" },
+]
+classifiers = [
+ "Development Status :: 1 - Planning",
+ "Intended Audience :: Science/Research",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3 :: Only",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
+ "Topic :: Scientific/Engineering",
+ "Typing :: Typed",
+]
+dependencies = ["galax"]
+description = "Galax <-> Astropy."
+dynamic = ["version"]
+name = "galax"
+readme = "README.md"
+license.file = "LICENSE"
+requires-python = ">=3.11"
+
+
+[project.urls]
+"Bug Tracker" = "https://github.com/GalacticDynamics/galax/issues"
+Changelog = "https://github.com/GalacticDynamics/galax/releases"
+Discussions = "https://github.com/GalacticDynamics/galax/discussions"
+Homepage = "https://github.com/GalacticDynamics/galax"
+Source = "https://github.com/GalacticDynamics/galax/tree/main/packages/galax_interop_astropy"
+
+
+[tool.hatch]
+metadata.allow-direct-references = true
+version.source = "vcs"
+version.raw-options.root = "../.."
+
+[tool.hatch.build]
+directory = "../dist"
+hooks.vcs.version-file = "../../src/galax_suite/galax_interop_astropy/_version.py"
+
+[tool.hatch.build.targets.sdist]
+exclude = ["pyproject.toml"]
+
+[tool.hatch.build.targets.sdist.force-include]
+"../../src/galax_suite/galax_interop_astropy" = "galax_interop_astropy"
+
+[tool.hatch.build.targets.wheel.force-include]
+"../../src/galax_suite/galax_interop_astropy" = "galax_interop_astropy"
diff --git a/packages/galax_interop_gala/LICENSE b/packages/galax_interop_gala/LICENSE
new file mode 100644
index 00000000..90ca9c1c
--- /dev/null
+++ b/packages/galax_interop_gala/LICENSE
@@ -0,0 +1,19 @@
+Copyright 2023 galax maintainers
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/packages/galax_interop_gala/README.md b/packages/galax_interop_gala/README.md
new file mode 100644
index 00000000..5b2f88e2
--- /dev/null
+++ b/packages/galax_interop_gala/README.md
@@ -0,0 +1,4 @@
+ galax-interop-gala
+Galactic and Gravitational Dynamics
+
+Galax interoperability with Gala.
diff --git a/packages/galax_interop_gala/pyproject.toml b/packages/galax_interop_gala/pyproject.toml
new file mode 100644
index 00000000..fea3e8d7
--- /dev/null
+++ b/packages/galax_interop_gala/pyproject.toml
@@ -0,0 +1,60 @@
+[build-system]
+build-backend = "hatchling.build"
+requires = ["hatchling", "hatch-vcs"]
+
+
+[project]
+authors = [
+ { name = "galax maintainers", email = "nstarman@users.noreply.github.com" },
+ { name = "Jake Nibauer", email = "jnibauer@princeton.edu" },
+ { name = "Adrian Price-Whelan", email = "adrianmpw@gmail.com" },
+ { name = "Nathaniel Starkman", email = "nstarman@users.noreply.github.com" },
+]
+classifiers = [
+ "Development Status :: 1 - Planning",
+ "Intended Audience :: Science/Research",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3 :: Only",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
+ "Topic :: Scientific/Engineering",
+ "Typing :: Typed",
+]
+dependencies = ["galax"]
+description = "Galax <-> Gala."
+dynamic = ["version"]
+name = "galax"
+readme = "README.md"
+license.file = "LICENSE"
+requires-python = ">=3.11"
+
+
+[project.urls]
+"Bug Tracker" = "https://github.com/GalacticDynamics/galax/issues"
+Changelog = "https://github.com/GalacticDynamics/galax/releases"
+Discussions = "https://github.com/GalacticDynamics/galax/discussions"
+Homepage = "https://github.com/GalacticDynamics/galax"
+Source = "https://github.com/GalacticDynamics/galax/tree/main/packages/galax_interop_gala"
+
+
+[tool.hatch]
+metadata.allow-direct-references = true
+version.source = "vcs"
+version.raw-options.root = "../.."
+
+[tool.hatch.build]
+directory = "../dist"
+hooks.vcs.version-file = "../../src/galax_suite/galax_interop_gala/_version.py"
+
+[tool.hatch.build.targets.sdist]
+exclude = ["pyproject.toml"]
+
+[tool.hatch.build.targets.sdist.force-include]
+"../../src/galax_suite/galax_interop_gala" = "galax_interop_gala"
+
+[tool.hatch.build.targets.wheel.force-include]
+"../../src/galax_suite/galax_interop_gala" = "galax_interop_gala"
diff --git a/pyproject.toml b/pyproject.toml
index 91ea39ef..0c70a59b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -25,46 +25,18 @@ classifiers = [
"Typing :: Typed",
]
dependencies = [
- "astropy >= 6.0",
- "beartype >= 0.18",
- "coordinax >= 0.7",
- "diffrax >= 0.5",
- "equinox >=0.11, != 0.11.3",
- "jax >= 0.4, != 0.4.27",
- "jaxlib != 0.4.27",
- "lazy_loader >= 0.4",
- "packaging", # for optional dependencies
- "quax >= 0.0.3",
- "quaxed >= 0.4",
- "typing_extensions >= 4.11",
- "unxt",
- # Temporary
- "plum-dispatch < 2.4.2",
+ "galax @ {root:uri}/packages/galax",
+ "galax-interop-astropy @ {root:uri}/packages/galax_interop_astropy",
+ "galax-interop-gala @ {root:uri}/packages/galax_interop_gala",
]
-description = "Galactic Dynamics in Jax."
+description = "Suite of Tools for Galactic Dynamics in Jax."
dynamic = ["version"]
-name = "galax"
+name = "galax-suite"
readme = "README.md"
license.file = "LICENSE"
requires-python = ">=3.11"
[project.optional-dependencies]
-# All runtime dependencies
-all = ["galax[interop-all]"]
-# Interoperability dependencies
-interop-all = ["galax[interop-astropy]", "galax[interop-gala]"]
-interop-astropy = [
- "astropy >= 6.0",
-]
-interop-gala = [
- "galax[interop-astropy]",
- "gala",
- # Temporary
- "astropy < 6.1",
- "numpy < 2.0",
-]
-# TODO: galpy and agama
-# Documentation dependencies
docs = [
"sphinx>=7.0",
"myst_parser>=0.13",
@@ -74,19 +46,12 @@ docs = [
]
# Test dependencies
test = [
- # "hypothesis[numpy]",
- "nox",
- "pre-commit",
- "pytest >=6",
- "pytest-cov >=3",
- "pytest-arraydiff",
- "sybil",
+ "galax @ {root:uri}/packages/galax[test]",
]
# Development dependencies
dev = [
- "galax[all]",
- "galax[docs]",
- "galax[test]",
+ "galax-suite[docs]",
+ "galax-suite[test]",
]
[project.urls]
@@ -96,15 +61,16 @@ Discussions = "https://github.com/GalacticDynamics/galax/discussions"
Homepage = "https://github.com/GalacticDynamics/galax"
-[tool.hatch]
-build.hooks.vcs.version-file = "src/galax/_version.py"
-metadata.allow-direct-references = true
-version.source = "vcs"
+[tool.hatch.metadata]
+allow-direct-references = true # to be able to use the direct dependencies above
+
+[tool.hatch.version]
+source = "vcs"
+
+[tool.hatch.build.hooks.vcs]
+version-file = "src/galax_suite/_version.py"
-[tool.hatch.envs.default]
-dependencies = ["pytest", "pytest-cov"]
-features = ["test"]
-scripts.test = "pytest {args}"
+[tool.hatch.build.targets.wheel]
[tool.pytest.ini_options]
@@ -216,8 +182,6 @@ ignore = [
"TD003", # Missing issue link on the line following this TODO
"UP037", # Remove quote from type annotation <- jaxtyping
]
-# Uncomment if using a _compat.typing backport
-# typing-modules = ["galax._compat.typing"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F403"]
diff --git a/src/galax/dynamics/_dynamics/integrate/__init__.py b/src/galax/dynamics/_dynamics/integrate/__init__.py
deleted file mode 100644
index 5df12577..00000000
--- a/src/galax/dynamics/_dynamics/integrate/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-"""galax: Galactic Dynamix in Jax."""
-
-from . import api, base, builtin, funcs
-from .api import *
-from .base import *
-from .builtin import *
-from .funcs import *
-
-__all__: list[str] = []
-__all__ += api.__all__
-__all__ += base.__all__
-__all__ += builtin.__all__
-__all__ += funcs.__all__
-
-# Cleanup
-del api, base, builtin, funcs
diff --git a/src/galax/dynamics/integrate.py b/src/galax/dynamics/integrate.py
deleted file mode 100644
index 646a8d2c..00000000
--- a/src/galax/dynamics/integrate.py
+++ /dev/null
@@ -1,10 +0,0 @@
-""":mod:`galax.dynamics.integrate`."""
-
-from ._dynamics import integrate
-from ._dynamics.integrate import * # noqa: F403
-
-__all__: list[str] = []
-__all__ += integrate.__all__
-
-# Cleanup
-del integrate
diff --git a/src/galax/__init__.py b/src/galax_suite/galax/__init__.py
similarity index 51%
rename from src/galax/__init__.py
rename to src/galax_suite/galax/__init__.py
index bf65a791..a0db1326 100644
--- a/src/galax/__init__.py
+++ b/src/galax_suite/galax/__init__.py
@@ -21,8 +21,11 @@
)
from ._version import version as __version__, version_tuple as __version_tuple__
-if utils._optional_deps.HAS_ASTROPY: # noqa: SLF001
- from . import _galax_interop_astropy # noqa: F401
+# =============================================================================
+# Import interoperation libraries to register the dispatchers
-if utils._optional_deps.HAS_GALA: # noqa: SLF001
- from . import _galax_interop_gala # noqa: F401
+if utils._optional_deps.HAS_GALAX_INTEROP_ASTROPY: # noqa: SLF001
+ import galax_interop_astropy as interop_astropy # noqa: F401
+
+if utils._optional_deps.HAS_GALAX_INTEROP_GALA: # noqa: SLF001
+ import galax_interop_gala as interop_gala # noqa: F401
diff --git a/src/galax/_version.pyi b/src/galax_suite/galax/_version.pyi
similarity index 100%
rename from src/galax/_version.pyi
rename to src/galax_suite/galax/_version.pyi
diff --git a/src/galax/coordinates/__init__.py b/src/galax_suite/galax/coordinates/__init__.py
similarity index 100%
rename from src/galax/coordinates/__init__.py
rename to src/galax_suite/galax/coordinates/__init__.py
diff --git a/src/galax/coordinates/__init__.pyi b/src/galax_suite/galax/coordinates/__init__.pyi
similarity index 100%
rename from src/galax/coordinates/__init__.pyi
rename to src/galax_suite/galax/coordinates/__init__.pyi
diff --git a/src/galax/coordinates/_psp/__init__.py b/src/galax_suite/galax/coordinates/_psp/__init__.py
similarity index 100%
rename from src/galax/coordinates/_psp/__init__.py
rename to src/galax_suite/galax/coordinates/_psp/__init__.py
diff --git a/src/galax/coordinates/_psp/base.py b/src/galax_suite/galax/coordinates/_psp/base.py
similarity index 100%
rename from src/galax/coordinates/_psp/base.py
rename to src/galax_suite/galax/coordinates/_psp/base.py
diff --git a/src/galax/coordinates/_psp/base_composite.py b/src/galax_suite/galax/coordinates/_psp/base_composite.py
similarity index 100%
rename from src/galax/coordinates/_psp/base_composite.py
rename to src/galax_suite/galax/coordinates/_psp/base_composite.py
diff --git a/src/galax/coordinates/_psp/base_psp.py b/src/galax_suite/galax/coordinates/_psp/base_psp.py
similarity index 100%
rename from src/galax/coordinates/_psp/base_psp.py
rename to src/galax_suite/galax/coordinates/_psp/base_psp.py
diff --git a/src/galax/coordinates/_psp/core.py b/src/galax_suite/galax/coordinates/_psp/core.py
similarity index 100%
rename from src/galax/coordinates/_psp/core.py
rename to src/galax_suite/galax/coordinates/_psp/core.py
diff --git a/src/galax/coordinates/_psp/interp.py b/src/galax_suite/galax/coordinates/_psp/interp.py
similarity index 100%
rename from src/galax/coordinates/_psp/interp.py
rename to src/galax_suite/galax/coordinates/_psp/interp.py
diff --git a/src/galax/coordinates/_psp/operator_compat.py b/src/galax_suite/galax/coordinates/_psp/operator_compat.py
similarity index 100%
rename from src/galax/coordinates/_psp/operator_compat.py
rename to src/galax_suite/galax/coordinates/_psp/operator_compat.py
diff --git a/src/galax/coordinates/_psp/utils.py b/src/galax_suite/galax/coordinates/_psp/utils.py
similarity index 100%
rename from src/galax/coordinates/_psp/utils.py
rename to src/galax_suite/galax/coordinates/_psp/utils.py
diff --git a/src/galax/coordinates/operators/__init__.py b/src/galax_suite/galax/coordinates/operators/__init__.py
similarity index 100%
rename from src/galax/coordinates/operators/__init__.py
rename to src/galax_suite/galax/coordinates/operators/__init__.py
diff --git a/src/galax/coordinates/operators/_rotating.py b/src/galax_suite/galax/coordinates/operators/_rotating.py
similarity index 100%
rename from src/galax/coordinates/operators/_rotating.py
rename to src/galax_suite/galax/coordinates/operators/_rotating.py
diff --git a/src/galax/dynamics/__init__.py b/src/galax_suite/galax/dynamics/__init__.py
similarity index 100%
rename from src/galax/dynamics/__init__.py
rename to src/galax_suite/galax/dynamics/__init__.py
diff --git a/src/galax/dynamics/_dynamics/__init__.py b/src/galax_suite/galax/dynamics/_dynamics/__init__.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/__init__.py
rename to src/galax_suite/galax/dynamics/_dynamics/__init__.py
diff --git a/src/galax/dynamics/_dynamics/base.py b/src/galax_suite/galax/dynamics/_dynamics/base.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/base.py
rename to src/galax_suite/galax/dynamics/_dynamics/base.py
diff --git a/src/galax_suite/galax/dynamics/_dynamics/integrate/__init__.py b/src/galax_suite/galax/dynamics/_dynamics/integrate/__init__.py
new file mode 100644
index 00000000..71f451d0
--- /dev/null
+++ b/src/galax_suite/galax/dynamics/_dynamics/integrate/__init__.py
@@ -0,0 +1,3 @@
+"""Integration routines."""
+
+__all__: list[str] = []
diff --git a/src/galax/dynamics/_dynamics/integrate/api.py b/src/galax_suite/galax/dynamics/_dynamics/integrate/api.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/integrate/api.py
rename to src/galax_suite/galax/dynamics/_dynamics/integrate/api.py
diff --git a/src/galax/dynamics/_dynamics/integrate/base.py b/src/galax_suite/galax/dynamics/_dynamics/integrate/base.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/integrate/base.py
rename to src/galax_suite/galax/dynamics/_dynamics/integrate/base.py
diff --git a/src/galax/dynamics/_dynamics/integrate/builtin.py b/src/galax_suite/galax/dynamics/_dynamics/integrate/builtin.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/integrate/builtin.py
rename to src/galax_suite/galax/dynamics/_dynamics/integrate/builtin.py
diff --git a/src/galax/dynamics/_dynamics/integrate/funcs.py b/src/galax_suite/galax/dynamics/_dynamics/integrate/funcs.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/integrate/funcs.py
rename to src/galax_suite/galax/dynamics/_dynamics/integrate/funcs.py
diff --git a/src/galax/dynamics/_dynamics/mockstream/__init__.py b/src/galax_suite/galax/dynamics/_dynamics/mockstream/__init__.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/mockstream/__init__.py
rename to src/galax_suite/galax/dynamics/_dynamics/mockstream/__init__.py
diff --git a/src/galax/dynamics/_dynamics/mockstream/_moving.py b/src/galax_suite/galax/dynamics/_dynamics/mockstream/_moving.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/mockstream/_moving.py
rename to src/galax_suite/galax/dynamics/_dynamics/mockstream/_moving.py
diff --git a/src/galax/dynamics/_dynamics/mockstream/core.py b/src/galax_suite/galax/dynamics/_dynamics/mockstream/core.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/mockstream/core.py
rename to src/galax_suite/galax/dynamics/_dynamics/mockstream/core.py
diff --git a/src/galax/dynamics/_dynamics/mockstream/df/__init__.py b/src/galax_suite/galax/dynamics/_dynamics/mockstream/df/__init__.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/mockstream/df/__init__.py
rename to src/galax_suite/galax/dynamics/_dynamics/mockstream/df/__init__.py
diff --git a/src/galax/dynamics/_dynamics/mockstream/df/base.py b/src/galax_suite/galax/dynamics/_dynamics/mockstream/df/base.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/mockstream/df/base.py
rename to src/galax_suite/galax/dynamics/_dynamics/mockstream/df/base.py
diff --git a/src/galax/dynamics/_dynamics/mockstream/df/fardal15.py b/src/galax_suite/galax/dynamics/_dynamics/mockstream/df/fardal15.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/mockstream/df/fardal15.py
rename to src/galax_suite/galax/dynamics/_dynamics/mockstream/df/fardal15.py
diff --git a/src/galax/dynamics/_dynamics/mockstream/df/progenitor.py b/src/galax_suite/galax/dynamics/_dynamics/mockstream/df/progenitor.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/mockstream/df/progenitor.py
rename to src/galax_suite/galax/dynamics/_dynamics/mockstream/df/progenitor.py
diff --git a/src/galax/dynamics/_dynamics/mockstream/mockstream_generator.py b/src/galax_suite/galax/dynamics/_dynamics/mockstream/mockstream_generator.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/mockstream/mockstream_generator.py
rename to src/galax_suite/galax/dynamics/_dynamics/mockstream/mockstream_generator.py
diff --git a/src/galax/dynamics/_dynamics/mockstream/utils.py b/src/galax_suite/galax/dynamics/_dynamics/mockstream/utils.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/mockstream/utils.py
rename to src/galax_suite/galax/dynamics/_dynamics/mockstream/utils.py
diff --git a/src/galax/dynamics/_dynamics/orbit.py b/src/galax_suite/galax/dynamics/_dynamics/orbit.py
similarity index 100%
rename from src/galax/dynamics/_dynamics/orbit.py
rename to src/galax_suite/galax/dynamics/_dynamics/orbit.py
diff --git a/src/galax_suite/galax/dynamics/integrate.py b/src/galax_suite/galax/dynamics/integrate.py
new file mode 100644
index 00000000..26c94950
--- /dev/null
+++ b/src/galax_suite/galax/dynamics/integrate.py
@@ -0,0 +1,16 @@
+""":mod:`galax.dynamics.integrate`."""
+
+from ._dynamics.integrate import api, base, builtin, funcs
+from ._dynamics.integrate.api import * # noqa: F403
+from ._dynamics.integrate.base import * # noqa: F403
+from ._dynamics.integrate.builtin import * # noqa: F403
+from ._dynamics.integrate.funcs import * # noqa: F403
+
+__all__: list[str] = []
+__all__ += api.__all__
+__all__ += base.__all__
+__all__ += builtin.__all__
+__all__ += funcs.__all__
+
+# Cleanup
+del api, base, builtin, funcs
diff --git a/src/galax/dynamics/mockstream.py b/src/galax_suite/galax/dynamics/mockstream.py
similarity index 100%
rename from src/galax/dynamics/mockstream.py
rename to src/galax_suite/galax/dynamics/mockstream.py
diff --git a/src/galax/potential/__init__.py b/src/galax_suite/galax/potential/__init__.py
similarity index 100%
rename from src/galax/potential/__init__.py
rename to src/galax_suite/galax/potential/__init__.py
diff --git a/src/galax/potential/_potential/__init__.py b/src/galax_suite/galax/potential/_potential/__init__.py
similarity index 100%
rename from src/galax/potential/_potential/__init__.py
rename to src/galax_suite/galax/potential/_potential/__init__.py
diff --git a/src/galax/potential/_potential/base.py b/src/galax_suite/galax/potential/_potential/base.py
similarity index 99%
rename from src/galax/potential/_potential/base.py
rename to src/galax_suite/galax/potential/_potential/base.py
index 1d3096f5..a897374c 100644
--- a/src/galax/potential/_potential/base.py
+++ b/src/galax_suite/galax/potential/_potential/base.py
@@ -405,7 +405,7 @@ def evaluate_orbit(
def as_interop(self, library: AbstractInteroperableLibrary) -> object:
"""Convert the potential to an object of a different library."""
- return convert_potential(self, library)
+ return convert_potential(library, self)
##############################################################################
diff --git a/src/galax/potential/_potential/builtin/__init__.py b/src/galax_suite/galax/potential/_potential/builtin/__init__.py
similarity index 100%
rename from src/galax/potential/_potential/builtin/__init__.py
rename to src/galax_suite/galax/potential/_potential/builtin/__init__.py
diff --git a/src/galax/potential/_potential/builtin/bars.py b/src/galax_suite/galax/potential/_potential/builtin/bars.py
similarity index 100%
rename from src/galax/potential/_potential/builtin/bars.py
rename to src/galax_suite/galax/potential/_potential/builtin/bars.py
diff --git a/src/galax/potential/_potential/builtin/builtin.py b/src/galax_suite/galax/potential/_potential/builtin/builtin.py
similarity index 100%
rename from src/galax/potential/_potential/builtin/builtin.py
rename to src/galax_suite/galax/potential/_potential/builtin/builtin.py
diff --git a/src/galax/potential/_potential/builtin/logarithmic.py b/src/galax_suite/galax/potential/_potential/builtin/logarithmic.py
similarity index 100%
rename from src/galax/potential/_potential/builtin/logarithmic.py
rename to src/galax_suite/galax/potential/_potential/builtin/logarithmic.py
diff --git a/src/galax/potential/_potential/builtin/nfw.py b/src/galax_suite/galax/potential/_potential/builtin/nfw.py
similarity index 100%
rename from src/galax/potential/_potential/builtin/nfw.py
rename to src/galax_suite/galax/potential/_potential/builtin/nfw.py
diff --git a/src/galax/potential/_potential/builtin/special.py b/src/galax_suite/galax/potential/_potential/builtin/special.py
similarity index 100%
rename from src/galax/potential/_potential/builtin/special.py
rename to src/galax_suite/galax/potential/_potential/builtin/special.py
diff --git a/src/galax/potential/_potential/composite.py b/src/galax_suite/galax/potential/_potential/composite.py
similarity index 100%
rename from src/galax/potential/_potential/composite.py
rename to src/galax_suite/galax/potential/_potential/composite.py
diff --git a/src/galax/potential/_potential/core.py b/src/galax_suite/galax/potential/_potential/core.py
similarity index 100%
rename from src/galax/potential/_potential/core.py
rename to src/galax_suite/galax/potential/_potential/core.py
diff --git a/src/galax/potential/_potential/frame.py b/src/galax_suite/galax/potential/_potential/frame.py
similarity index 100%
rename from src/galax/potential/_potential/frame.py
rename to src/galax_suite/galax/potential/_potential/frame.py
diff --git a/src/galax/potential/_potential/funcs.py b/src/galax_suite/galax/potential/_potential/funcs.py
similarity index 100%
rename from src/galax/potential/_potential/funcs.py
rename to src/galax_suite/galax/potential/_potential/funcs.py
diff --git a/src/galax/potential/_potential/io.py b/src/galax_suite/galax/potential/_potential/io.py
similarity index 100%
rename from src/galax/potential/_potential/io.py
rename to src/galax_suite/galax/potential/_potential/io.py
diff --git a/src/galax/potential/_potential/params/__init__.py b/src/galax_suite/galax/potential/_potential/params/__init__.py
similarity index 100%
rename from src/galax/potential/_potential/params/__init__.py
rename to src/galax_suite/galax/potential/_potential/params/__init__.py
diff --git a/src/galax/potential/_potential/params/attr.py b/src/galax_suite/galax/potential/_potential/params/attr.py
similarity index 100%
rename from src/galax/potential/_potential/params/attr.py
rename to src/galax_suite/galax/potential/_potential/params/attr.py
diff --git a/src/galax/potential/_potential/params/core.py b/src/galax_suite/galax/potential/_potential/params/core.py
similarity index 100%
rename from src/galax/potential/_potential/params/core.py
rename to src/galax_suite/galax/potential/_potential/params/core.py
diff --git a/src/galax/potential/_potential/params/field.py b/src/galax_suite/galax/potential/_potential/params/field.py
similarity index 100%
rename from src/galax/potential/_potential/params/field.py
rename to src/galax_suite/galax/potential/_potential/params/field.py
diff --git a/src/galax/potential/_potential/params/utils.py b/src/galax_suite/galax/potential/_potential/params/utils.py
similarity index 100%
rename from src/galax/potential/_potential/params/utils.py
rename to src/galax_suite/galax/potential/_potential/params/utils.py
diff --git a/src/galax/potential/_potential/utils.py b/src/galax_suite/galax/potential/_potential/utils.py
similarity index 100%
rename from src/galax/potential/_potential/utils.py
rename to src/galax_suite/galax/potential/_potential/utils.py
diff --git a/src/galax/potential/io.py b/src/galax_suite/galax/potential/io.py
similarity index 100%
rename from src/galax/potential/io.py
rename to src/galax_suite/galax/potential/io.py
diff --git a/src/galax/potential/params.py b/src/galax_suite/galax/potential/params.py
similarity index 100%
rename from src/galax/potential/params.py
rename to src/galax_suite/galax/potential/params.py
diff --git a/src/galax/py.typed b/src/galax_suite/galax/py.typed
similarity index 100%
rename from src/galax/py.typed
rename to src/galax_suite/galax/py.typed
diff --git a/src/galax/setup_package.py b/src/galax_suite/galax/setup_package.py
similarity index 100%
rename from src/galax/setup_package.py
rename to src/galax_suite/galax/setup_package.py
diff --git a/src/galax/typing.py b/src/galax_suite/galax/typing.py
similarity index 100%
rename from src/galax/typing.py
rename to src/galax_suite/galax/typing.py
diff --git a/src/galax/utils/__init__.py b/src/galax_suite/galax/utils/__init__.py
similarity index 100%
rename from src/galax/utils/__init__.py
rename to src/galax_suite/galax/utils/__init__.py
diff --git a/src/galax/utils/_collections.py b/src/galax_suite/galax/utils/_collections.py
similarity index 100%
rename from src/galax/utils/_collections.py
rename to src/galax_suite/galax/utils/_collections.py
diff --git a/src/galax/utils/_jax.py b/src/galax_suite/galax/utils/_jax.py
similarity index 100%
rename from src/galax/utils/_jax.py
rename to src/galax_suite/galax/utils/_jax.py
diff --git a/src/galax/utils/_misc.py b/src/galax_suite/galax/utils/_misc.py
similarity index 100%
rename from src/galax/utils/_misc.py
rename to src/galax_suite/galax/utils/_misc.py
diff --git a/src/galax/utils/_optional_deps.py b/src/galax_suite/galax/utils/_optional_deps.py
similarity index 84%
rename from src/galax/utils/_optional_deps.py
rename to src/galax_suite/galax/utils/_optional_deps.py
index b3997962..9a2c5d59 100644
--- a/src/galax/utils/_optional_deps.py
+++ b/src/galax_suite/galax/utils/_optional_deps.py
@@ -19,8 +19,11 @@ def get_version(package_name: str) -> Version | Literal[False]:
return parse(version_str)
-# This is currently a required dependency
HAS_ASTROPY: Version | Literal[False] = get_version("astropy")
+HAS_GALAX_INTEROP_ASTROPY: Version | Literal[False] = get_version(
+ "galax-interop-astropy"
+)
+HAS_GALAX_INTEROP_GALA: Version | Literal[False] = get_version("galax-interop-gala")
HAS_GALA: Version | Literal[False] = get_version("gala")
diff --git a/src/galax/utils/_shape.py b/src/galax_suite/galax/utils/_shape.py
similarity index 100%
rename from src/galax/utils/_shape.py
rename to src/galax_suite/galax/utils/_shape.py
diff --git a/src/galax/utils/dataclasses.py b/src/galax_suite/galax/utils/dataclasses.py
similarity index 100%
rename from src/galax/utils/dataclasses.py
rename to src/galax_suite/galax/utils/dataclasses.py
diff --git a/src/galax/_galax_interop_astropy/__init__.py b/src/galax_suite/galax_interop_astropy/__init__.py
similarity index 100%
rename from src/galax/_galax_interop_astropy/__init__.py
rename to src/galax_suite/galax_interop_astropy/__init__.py
diff --git a/src/galax/_galax_interop_astropy/coordinates.py b/src/galax_suite/galax_interop_astropy/coordinates.py
similarity index 100%
rename from src/galax/_galax_interop_astropy/coordinates.py
rename to src/galax_suite/galax_interop_astropy/coordinates.py
diff --git a/src/galax/_galax_interop_astropy/dynamics.py b/src/galax_suite/galax_interop_astropy/dynamics.py
similarity index 100%
rename from src/galax/_galax_interop_astropy/dynamics.py
rename to src/galax_suite/galax_interop_astropy/dynamics.py
diff --git a/src/galax/_galax_interop_astropy/potential.py b/src/galax_suite/galax_interop_astropy/potential.py
similarity index 100%
rename from src/galax/_galax_interop_astropy/potential.py
rename to src/galax_suite/galax_interop_astropy/potential.py
diff --git a/src/galax/_galax_interop_gala/__init__.py b/src/galax_suite/galax_interop_gala/__init__.py
similarity index 100%
rename from src/galax/_galax_interop_gala/__init__.py
rename to src/galax_suite/galax_interop_gala/__init__.py
diff --git a/src/galax/_galax_interop_gala/coordinates.py b/src/galax_suite/galax_interop_gala/coordinates.py
similarity index 100%
rename from src/galax/_galax_interop_gala/coordinates.py
rename to src/galax_suite/galax_interop_gala/coordinates.py
diff --git a/src/galax/_galax_interop_gala/potential.py b/src/galax_suite/galax_interop_gala/potential.py
similarity index 100%
rename from src/galax/_galax_interop_gala/potential.py
rename to src/galax_suite/galax_interop_gala/potential.py