galax 0.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- galax-0.0.2/.copier-answers.yml +12 -0
- galax-0.0.2/.git_archival.txt +4 -0
- galax-0.0.2/.gitattributes +1 -0
- galax-0.0.2/.github/CONTRIBUTING.md +101 -0
- galax-0.0.2/.github/dependabot.yml +11 -0
- galax-0.0.2/.github/matchers/pylint.json +32 -0
- galax-0.0.2/.github/workflows/cd.yml +72 -0
- galax-0.0.2/.github/workflows/ci.yml +126 -0
- galax-0.0.2/.gitignore +160 -0
- galax-0.0.2/.pre-commit-config.yaml +104 -0
- galax-0.0.2/.readthedocs.yaml +18 -0
- galax-0.0.2/AUTHORS.rst +30 -0
- galax-0.0.2/LICENSE +19 -0
- galax-0.0.2/PKG-INFO +138 -0
- galax-0.0.2/README.md +42 -0
- galax-0.0.2/conftest.py +17 -0
- galax-0.0.2/docs/conf.py +45 -0
- galax-0.0.2/docs/contributing.rst +19 -0
- galax-0.0.2/docs/docs.rst +16 -0
- galax-0.0.2/docs/getting_started.rst +223 -0
- galax-0.0.2/docs/glossary.rst +43 -0
- galax-0.0.2/docs/index.rst +58 -0
- galax-0.0.2/docs/install.rst +49 -0
- galax-0.0.2/docs/testing.rst +42 -0
- galax-0.0.2/docs/tutorials.rst +16 -0
- galax-0.0.2/docs/user_guide.rst +40 -0
- galax-0.0.2/docs/whatsnew/1.0.rst +25 -0
- galax-0.0.2/docs/whatsnew/index.rst +8 -0
- galax-0.0.2/noxfile.py +124 -0
- galax-0.0.2/pyproject.toml +266 -0
- galax-0.0.2/src/galax/__init__.py +22 -0
- galax-0.0.2/src/galax/__init__.pyi +20 -0
- galax-0.0.2/src/galax/_version.py +16 -0
- galax-0.0.2/src/galax/_version.pyi +2 -0
- galax-0.0.2/src/galax/coordinates/__init__.py +21 -0
- galax-0.0.2/src/galax/coordinates/__init__.pyi +26 -0
- galax-0.0.2/src/galax/coordinates/_compat.py +135 -0
- galax-0.0.2/src/galax/coordinates/_psp/__init__.py +26 -0
- galax-0.0.2/src/galax/coordinates/_psp/base.py +652 -0
- galax-0.0.2/src/galax/coordinates/_psp/base_composite.py +197 -0
- galax-0.0.2/src/galax/coordinates/_psp/base_psp.py +126 -0
- galax-0.0.2/src/galax/coordinates/_psp/compat_apy.py +112 -0
- galax-0.0.2/src/galax/coordinates/_psp/core.py +166 -0
- galax-0.0.2/src/galax/coordinates/_psp/interp.py +94 -0
- galax-0.0.2/src/galax/coordinates/_psp/operator_compat.py +342 -0
- galax-0.0.2/src/galax/coordinates/_psp/utils.py +202 -0
- galax-0.0.2/src/galax/coordinates/operators/__init__.py +10 -0
- galax-0.0.2/src/galax/coordinates/operators/_rotating.py +318 -0
- galax-0.0.2/src/galax/dynamics/__init__.py +17 -0
- galax-0.0.2/src/galax/dynamics/__init__.pyi +28 -0
- galax-0.0.2/src/galax/dynamics/_compat.py +52 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/__init__.py +4 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/base.py +145 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/integrate/__init__.py +16 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/integrate/_api.py +89 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/integrate/_base.py +133 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/integrate/_builtin.py +436 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/integrate/_funcs.py +248 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/mockstream/__init__.py +14 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/mockstream/_moving.py +41 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/mockstream/core.py +139 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/mockstream/df/__init__.py +14 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/mockstream/df/_base.py +172 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/mockstream/df/_fardal.py +311 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/mockstream/df/_progenitor.py +50 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/mockstream/mockstream_generator.py +262 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/mockstream/utils.py +30 -0
- galax-0.0.2/src/galax/dynamics/_dynamics/orbit.py +69 -0
- galax-0.0.2/src/galax/potential/__init__.py +13 -0
- galax-0.0.2/src/galax/potential/__init__.pyi +120 -0
- galax-0.0.2/src/galax/potential/_potential/__init__.py +4 -0
- galax-0.0.2/src/galax/potential/_potential/base.py +399 -0
- galax-0.0.2/src/galax/potential/_potential/builtin/__init__.py +16 -0
- galax-0.0.2/src/galax/potential/_potential/builtin/bars.py +123 -0
- galax-0.0.2/src/galax/potential/_potential/builtin/builtin.py +717 -0
- galax-0.0.2/src/galax/potential/_potential/builtin/logarithmic.py +94 -0
- galax-0.0.2/src/galax/potential/_potential/builtin/nfw.py +485 -0
- galax-0.0.2/src/galax/potential/_potential/builtin/special.py +308 -0
- galax-0.0.2/src/galax/potential/_potential/composite.py +121 -0
- galax-0.0.2/src/galax/potential/_potential/core.py +47 -0
- galax-0.0.2/src/galax/potential/_potential/frame.py +254 -0
- galax-0.0.2/src/galax/potential/_potential/funcs.py +2068 -0
- galax-0.0.2/src/galax/potential/_potential/io/__init__.py +11 -0
- galax-0.0.2/src/galax/potential/_potential/io/__init__.pyi +3 -0
- galax-0.0.2/src/galax/potential/_potential/io/_gala.py +633 -0
- galax-0.0.2/src/galax/potential/_potential/param/__init__.py +11 -0
- galax-0.0.2/src/galax/potential/_potential/param/attr.py +133 -0
- galax-0.0.2/src/galax/potential/_potential/param/core.py +255 -0
- galax-0.0.2/src/galax/potential/_potential/param/field.py +271 -0
- galax-0.0.2/src/galax/potential/_potential/param/utils.py +49 -0
- galax-0.0.2/src/galax/potential/_potential/utils.py +96 -0
- galax-0.0.2/src/galax/py.typed +0 -0
- galax-0.0.2/src/galax/setup_package.py +13 -0
- galax-0.0.2/src/galax/typing.py +136 -0
- galax-0.0.2/src/galax/utils/__init__.py +9 -0
- galax-0.0.2/src/galax/utils/_collections.py +110 -0
- galax-0.0.2/src/galax/utils/_jax.py +55 -0
- galax-0.0.2/src/galax/utils/_misc.py +14 -0
- galax-0.0.2/src/galax/utils/_optional_deps.py +34 -0
- galax-0.0.2/src/galax/utils/_shape.py +180 -0
- galax-0.0.2/src/galax/utils/dataclasses.py +289 -0
- galax-0.0.2/tests/functional/reference/test_first_deriv.txt +5 -0
- galax-0.0.2/tests/functional/reference/test_second_deriv.txt +25 -0
- galax-0.0.2/tests/functional/test_mockstreamgenerator.py +103 -0
- galax-0.0.2/tests/smoke/__init__.py +0 -0
- galax-0.0.2/tests/smoke/coordinates/__init__.py +0 -0
- galax-0.0.2/tests/smoke/coordinates/test_package.py +17 -0
- galax-0.0.2/tests/smoke/dynamics/__init__.py +0 -0
- galax-0.0.2/tests/smoke/dynamics/integrate/__init__.py +0 -0
- galax-0.0.2/tests/smoke/dynamics/integrate/test_package.py +11 -0
- galax-0.0.2/tests/smoke/dynamics/mockstream/__init__.py +0 -0
- galax-0.0.2/tests/smoke/dynamics/mockstream/test_package.py +11 -0
- galax-0.0.2/tests/smoke/dynamics/test_package.py +22 -0
- galax-0.0.2/tests/smoke/potential/__init__.py +0 -0
- galax-0.0.2/tests/smoke/potential/test_package.py +25 -0
- galax-0.0.2/tests/smoke/test_package.py +22 -0
- galax-0.0.2/tests/smoke/utils/__init__.py +0 -0
- galax-0.0.2/tests/smoke/utils/test_package.py +10 -0
- galax-0.0.2/tests/unit/__init__.py +0 -0
- galax-0.0.2/tests/unit/coordinates/__init__.py +0 -0
- galax-0.0.2/tests/unit/coordinates/psp/__init__.py +0 -0
- galax-0.0.2/tests/unit/coordinates/psp/test_base_psp.py +282 -0
- galax-0.0.2/tests/unit/coordinates/psp/test_psp.py +15 -0
- galax-0.0.2/tests/unit/coordinates/psp/test_utils.py +182 -0
- galax-0.0.2/tests/unit/dynamics/__init__.py +0 -0
- galax-0.0.2/tests/unit/dynamics/mockstream/__init__.py +0 -0
- galax-0.0.2/tests/unit/dynamics/mockstream/test_mockstreamgenerator.py +95 -0
- galax-0.0.2/tests/unit/dynamics/test_orbit.py +87 -0
- galax-0.0.2/tests/unit/potential/__init__.py +0 -0
- galax-0.0.2/tests/unit/potential/builtin/__init__.py +0 -0
- galax-0.0.2/tests/unit/potential/builtin/bars/__init__.py +0 -0
- galax-0.0.2/tests/unit/potential/builtin/bars/test_bar.py +109 -0
- galax-0.0.2/tests/unit/potential/builtin/bars/test_longmuralibar.py +127 -0
- galax-0.0.2/tests/unit/potential/builtin/logarithmic/__init__.py +0 -0
- galax-0.0.2/tests/unit/potential/builtin/logarithmic/test_common.py +78 -0
- galax-0.0.2/tests/unit/potential/builtin/logarithmic/test_lmj09logarithmic.py +171 -0
- galax-0.0.2/tests/unit/potential/builtin/logarithmic/test_logarithmic.py +85 -0
- galax-0.0.2/tests/unit/potential/builtin/misc/__init__.py +0 -0
- galax-0.0.2/tests/unit/potential/builtin/misc/test_burkert.py +116 -0
- galax-0.0.2/tests/unit/potential/builtin/misc/test_hernquist.py +78 -0
- galax-0.0.2/tests/unit/potential/builtin/misc/test_isochrone.py +79 -0
- galax-0.0.2/tests/unit/potential/builtin/misc/test_jaffe.py +85 -0
- galax-0.0.2/tests/unit/potential/builtin/misc/test_kepler.py +78 -0
- galax-0.0.2/tests/unit/potential/builtin/misc/test_kuzmin.py +104 -0
- galax-0.0.2/tests/unit/potential/builtin/misc/test_leesutotriaxialnfw.py +199 -0
- galax-0.0.2/tests/unit/potential/builtin/misc/test_miyamotonagai.py +89 -0
- galax-0.0.2/tests/unit/potential/builtin/misc/test_null.py +96 -0
- galax-0.0.2/tests/unit/potential/builtin/misc/test_plummer.py +85 -0
- galax-0.0.2/tests/unit/potential/builtin/misc/test_powerlawcutoff.py +162 -0
- galax-0.0.2/tests/unit/potential/builtin/misc/test_satoh.py +92 -0
- galax-0.0.2/tests/unit/potential/builtin/misc/test_stone.py +138 -0
- galax-0.0.2/tests/unit/potential/builtin/misc/test_triaxialhernquist.py +93 -0
- galax-0.0.2/tests/unit/potential/builtin/nfw/__init__.py +0 -0
- galax-0.0.2/tests/unit/potential/builtin/nfw/test_nfw.py +90 -0
- galax-0.0.2/tests/unit/potential/builtin/nfw/test_triaxialnfw.py +104 -0
- galax-0.0.2/tests/unit/potential/builtin/nfw/test_vogelsberger08nfw.py +135 -0
- galax-0.0.2/tests/unit/potential/builtin/special/__init__.py +0 -0
- galax-0.0.2/tests/unit/potential/builtin/special/test_bovymwpotential2014.py +122 -0
- galax-0.0.2/tests/unit/potential/builtin/special/test_lm10.py +126 -0
- galax-0.0.2/tests/unit/potential/builtin/special/test_milkywaypotential.py +114 -0
- galax-0.0.2/tests/unit/potential/builtin/test_common.py +269 -0
- galax-0.0.2/tests/unit/potential/io/__init__.py +0 -0
- galax-0.0.2/tests/unit/potential/io/gala_helper.py +365 -0
- galax-0.0.2/tests/unit/potential/io/test_gala.py +109 -0
- galax-0.0.2/tests/unit/potential/param/__init__.py +0 -0
- galax-0.0.2/tests/unit/potential/param/test_core.py +146 -0
- galax-0.0.2/tests/unit/potential/param/test_field.py +5 -0
- galax-0.0.2/tests/unit/potential/test_base.py +303 -0
- galax-0.0.2/tests/unit/potential/test_composite.py +368 -0
- galax-0.0.2/tests/unit/potential/test_core.py +140 -0
- galax-0.0.2/tests/unit/potential/test_frame.py +59 -0
- galax-0.0.2/tests/unit/potential/test_utils.py +130 -0
- galax-0.0.2/tests/unit/utils/__init__.py +0 -0
- galax-0.0.2/tests/unit/utils/test_collections.py +112 -0
- galax-0.0.2/tests/unit/utils/test_dataclasses.py +48 -0
- galax-0.0.2/tests/unit/utils/test_jax.py +21 -0
- galax-0.0.2/tests/unit/utils/test_misc.py +27 -0
- galax-0.0.2/tests/unit/utils/test_shape.py +106 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
|
|
2
|
+
_commit: 2024.04.23
|
|
3
|
+
_src_path: gh:scientific-python/cookie
|
|
4
|
+
backend: hatch
|
|
5
|
+
email: nstarman@users.noreply.github.com
|
|
6
|
+
full_name: galax maintainers
|
|
7
|
+
license: MIT
|
|
8
|
+
org: GalacticDynamics
|
|
9
|
+
project_name: galax
|
|
10
|
+
project_short_description: Galactic Dynamics in Jax.
|
|
11
|
+
url: https://github.com/GalacticDynamics/galax
|
|
12
|
+
vcs: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.git_archival.txt export-subst
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
See the [Scientific Python Developer Guide][spc-dev-intro] for a detailed
|
|
2
|
+
description of best practices for developing scientific packages.
|
|
3
|
+
|
|
4
|
+
[spc-dev-intro]: https://learn.scientific-python.org/development/
|
|
5
|
+
|
|
6
|
+
# Quick development
|
|
7
|
+
|
|
8
|
+
The fastest way to start with development is to use nox. If you don't have nox,
|
|
9
|
+
you can use `pipx run nox` to run it without installing, or `pipx install nox`.
|
|
10
|
+
If you don't have pipx (pip for applications), then you can install with
|
|
11
|
+
`pip install pipx` (the only case were installing an application with regular
|
|
12
|
+
pip is reasonable). If you use macOS, then pipx and nox are both in brew, use
|
|
13
|
+
`brew install pipx nox`.
|
|
14
|
+
|
|
15
|
+
To use, run `nox`. This will lint and test using every installed version of
|
|
16
|
+
Python on your system, skipping ones that are not installed. You can also run
|
|
17
|
+
specific jobs:
|
|
18
|
+
|
|
19
|
+
```console
|
|
20
|
+
$ nox -s lint # Lint only
|
|
21
|
+
$ nox -s tests # Python tests
|
|
22
|
+
$ nox -s docs -- --serve # Build and serve the docs
|
|
23
|
+
$ nox -s build # Make an SDist and wheel
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Nox handles everything for you, including setting up an temporary virtual
|
|
27
|
+
environment for each run.
|
|
28
|
+
|
|
29
|
+
# Setting up a development environment manually
|
|
30
|
+
|
|
31
|
+
You can set up a development environment by running:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
python3 -m venv .venv
|
|
35
|
+
source ./.venv/bin/activate
|
|
36
|
+
pip install -v -e .[dev]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If you have the
|
|
40
|
+
[Python Launcher for Unix](https://github.com/brettcannon/python-launcher), you
|
|
41
|
+
can instead do:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
py -m venv .venv
|
|
45
|
+
py -m install -v -e .[dev]
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
# Post setup
|
|
49
|
+
|
|
50
|
+
You should prepare pre-commit, which will help you by checking that commits pass
|
|
51
|
+
required checks:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install pre-commit # or brew install pre-commit on macOS
|
|
55
|
+
pre-commit install # Will install a pre-commit hook into the git repo
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
You can also/alternatively run `pre-commit run` (changes only) or
|
|
59
|
+
`pre-commit run --all-files` to check even without installing the hook.
|
|
60
|
+
|
|
61
|
+
# Testing
|
|
62
|
+
|
|
63
|
+
Use pytest to run the unit checks:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pytest
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
# Coverage
|
|
70
|
+
|
|
71
|
+
Use pytest-cov to generate coverage reports:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pytest --cov=galax
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
# Building docs
|
|
78
|
+
|
|
79
|
+
You can build the docs using:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
nox -s docs
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
You can see a preview with:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
nox -s docs -- --serve
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
# Pre-commit
|
|
92
|
+
|
|
93
|
+
This project uses pre-commit for all style checking. While you can run it with
|
|
94
|
+
nox, this is such an important tool that it deserves to be installed on its own.
|
|
95
|
+
Install pre-commit and run:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
pre-commit run -a
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
to check all files.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"problemMatcher": [
|
|
3
|
+
{
|
|
4
|
+
"severity": "warning",
|
|
5
|
+
"pattern": [
|
|
6
|
+
{
|
|
7
|
+
"regexp": "^([^:]+):(\\d+):(\\d+): ([A-DF-Z]\\d+): \\033\\[[\\d;]+m([^\\033]+).*$",
|
|
8
|
+
"file": 1,
|
|
9
|
+
"line": 2,
|
|
10
|
+
"column": 3,
|
|
11
|
+
"code": 4,
|
|
12
|
+
"message": 5
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"owner": "pylint-warning"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"severity": "error",
|
|
19
|
+
"pattern": [
|
|
20
|
+
{
|
|
21
|
+
"regexp": "^([^:]+):(\\d+):(\\d+): (E\\d+): \\033\\[[\\d;]+m([^\\033]+).*$",
|
|
22
|
+
"file": 1,
|
|
23
|
+
"line": 2,
|
|
24
|
+
"column": 3,
|
|
25
|
+
"code": 4,
|
|
26
|
+
"message": 5
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"owner": "pylint-error"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: CD
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
pull_request:
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
release:
|
|
10
|
+
types:
|
|
11
|
+
- published
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
env:
|
|
18
|
+
# Many color libraries just need this to be set to any value, but at least
|
|
19
|
+
# one distinguishes color depth, where "3" -> "256-bit color".
|
|
20
|
+
FORCE_COLOR: 3
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
dist:
|
|
24
|
+
name: Distribution build
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
with:
|
|
30
|
+
fetch-depth: 0
|
|
31
|
+
|
|
32
|
+
- uses: hynek/build-and-inspect-python-package@v2
|
|
33
|
+
|
|
34
|
+
test-publish:
|
|
35
|
+
needs: [dist]
|
|
36
|
+
name: Publish to TestPyPI
|
|
37
|
+
environment:
|
|
38
|
+
name: testpypi
|
|
39
|
+
permissions:
|
|
40
|
+
id-token: write
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
if: github.event_name == 'release' && github.event.action == 'published'
|
|
43
|
+
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/download-artifact@v4
|
|
46
|
+
with:
|
|
47
|
+
name: Packages
|
|
48
|
+
path: dist
|
|
49
|
+
|
|
50
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
51
|
+
if: github.event_name == 'release' && github.event.action == 'published'
|
|
52
|
+
with:
|
|
53
|
+
# Remember to tell (test-)pypi about this repo before publishing
|
|
54
|
+
# Remove this line to publish to PyPI
|
|
55
|
+
repository-url: https://test.pypi.org/legacy/
|
|
56
|
+
|
|
57
|
+
publish:
|
|
58
|
+
needs: [test-publish]
|
|
59
|
+
name: Publish to PyPI
|
|
60
|
+
environment: pypi
|
|
61
|
+
permissions:
|
|
62
|
+
id-token: write
|
|
63
|
+
runs-on: ubuntu-latest
|
|
64
|
+
if: github.event_name == 'release' && github.event.action == 'published'
|
|
65
|
+
|
|
66
|
+
steps:
|
|
67
|
+
- uses: actions/download-artifact@v4
|
|
68
|
+
with:
|
|
69
|
+
name: Packages
|
|
70
|
+
path: dist
|
|
71
|
+
|
|
72
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
pull_request:
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
env:
|
|
15
|
+
# Many color libraries just need this to be set to any value, but at least
|
|
16
|
+
# one distinguishes color depth, where "3" -> "256-bit color".
|
|
17
|
+
FORCE_COLOR: 3
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
pre-commit:
|
|
21
|
+
name: Format
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
with:
|
|
26
|
+
fetch-depth: 0
|
|
27
|
+
- uses: actions/setup-python@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.x"
|
|
30
|
+
- uses: pre-commit/action@v3.0.1
|
|
31
|
+
with:
|
|
32
|
+
extra_args: --hook-stage manual --all-files
|
|
33
|
+
# - name: Run PyLint
|
|
34
|
+
# run: |
|
|
35
|
+
# echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json"
|
|
36
|
+
# pipx run nox -s pylint
|
|
37
|
+
|
|
38
|
+
# Where there's smoke, there's fire!
|
|
39
|
+
smoke:
|
|
40
|
+
name: Smoke tests
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v4
|
|
44
|
+
with:
|
|
45
|
+
fetch-depth: 0
|
|
46
|
+
- uses: actions/setup-python@v5
|
|
47
|
+
with:
|
|
48
|
+
python-version: "3.x"
|
|
49
|
+
- name: Install package
|
|
50
|
+
run: python -m pip install ".[test]"
|
|
51
|
+
- name: Run smoke test
|
|
52
|
+
run: python -m pytest tests/smoke -ra
|
|
53
|
+
|
|
54
|
+
checks:
|
|
55
|
+
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
|
|
56
|
+
runs-on: ${{ matrix.runs-on }}
|
|
57
|
+
needs: [pre-commit, smoke]
|
|
58
|
+
strategy:
|
|
59
|
+
fail-fast: false
|
|
60
|
+
matrix:
|
|
61
|
+
python-version: ["3.11", "3.12"]
|
|
62
|
+
runs-on: [ubuntu-latest, macos-latest, windows-latest]
|
|
63
|
+
|
|
64
|
+
# TODO: figure out OpenBLAS install
|
|
65
|
+
# ``ERROR: Dependency "OpenBLAS" not found, tried pkgconfig and cmake``
|
|
66
|
+
# include:
|
|
67
|
+
# - python-version: pypy-3.11
|
|
68
|
+
# runs-on: ubuntu-latest
|
|
69
|
+
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/checkout@v4
|
|
72
|
+
with:
|
|
73
|
+
fetch-depth: 0
|
|
74
|
+
|
|
75
|
+
- uses: actions/setup-python@v5
|
|
76
|
+
with:
|
|
77
|
+
python-version: ${{ matrix.python-version }}
|
|
78
|
+
allow-prereleases: true
|
|
79
|
+
|
|
80
|
+
- name: Install package
|
|
81
|
+
run: python -m pip install '.[test]'
|
|
82
|
+
|
|
83
|
+
- name: Test package
|
|
84
|
+
run: >-
|
|
85
|
+
python -m pytest src docs tests/unit tests/functional -ra --cov
|
|
86
|
+
--cov-report=xml --cov-report=term --durations=20 --arraydiff -m"not
|
|
87
|
+
slow"
|
|
88
|
+
|
|
89
|
+
- name: Upload coverage report
|
|
90
|
+
uses: codecov/codecov-action@v4.4.1
|
|
91
|
+
with:
|
|
92
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
93
|
+
|
|
94
|
+
check_interop:
|
|
95
|
+
name: Check interoperability
|
|
96
|
+
runs-on: ${{ matrix.runs-on }}
|
|
97
|
+
needs: [pre-commit, smoke]
|
|
98
|
+
strategy:
|
|
99
|
+
fail-fast: false
|
|
100
|
+
matrix:
|
|
101
|
+
python-version: ["3.12"]
|
|
102
|
+
runs-on: [ubuntu-latest]
|
|
103
|
+
|
|
104
|
+
steps:
|
|
105
|
+
- uses: actions/checkout@v4
|
|
106
|
+
with:
|
|
107
|
+
fetch-depth: 0
|
|
108
|
+
|
|
109
|
+
- uses: actions/setup-python@v5
|
|
110
|
+
with:
|
|
111
|
+
python-version: ${{ matrix.python-version }}
|
|
112
|
+
allow-prereleases: true
|
|
113
|
+
|
|
114
|
+
- name: Install package
|
|
115
|
+
run: python -m pip install '.[test,interop-all]'
|
|
116
|
+
|
|
117
|
+
- name: Test package
|
|
118
|
+
run: >-
|
|
119
|
+
python -m pytest src docs tests/unit tests/functional -ra --cov
|
|
120
|
+
--cov-report=xml --cov-report=term --durations=20 --arraydiff -m"not
|
|
121
|
+
slow"
|
|
122
|
+
|
|
123
|
+
- name: Upload coverage report
|
|
124
|
+
uses: codecov/codecov-action@v4.4.1
|
|
125
|
+
with:
|
|
126
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
galax-0.0.2/.gitignore
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
98
|
+
__pypackages__/
|
|
99
|
+
|
|
100
|
+
# Celery stuff
|
|
101
|
+
celerybeat-schedule
|
|
102
|
+
celerybeat.pid
|
|
103
|
+
|
|
104
|
+
# SageMath parsed files
|
|
105
|
+
*.sage.py
|
|
106
|
+
|
|
107
|
+
# Environments
|
|
108
|
+
.env
|
|
109
|
+
.venv
|
|
110
|
+
env/
|
|
111
|
+
venv/
|
|
112
|
+
ENV/
|
|
113
|
+
env.bak/
|
|
114
|
+
venv.bak/
|
|
115
|
+
|
|
116
|
+
# Spyder project settings
|
|
117
|
+
.spyderproject
|
|
118
|
+
.spyproject
|
|
119
|
+
|
|
120
|
+
# Rope project settings
|
|
121
|
+
.ropeproject
|
|
122
|
+
|
|
123
|
+
# mkdocs documentation
|
|
124
|
+
/site
|
|
125
|
+
|
|
126
|
+
# mypy
|
|
127
|
+
.mypy_cache/
|
|
128
|
+
.dmypy.json
|
|
129
|
+
dmypy.json
|
|
130
|
+
|
|
131
|
+
# Pyre type checker
|
|
132
|
+
.pyre/
|
|
133
|
+
|
|
134
|
+
# pytype static type analyzer
|
|
135
|
+
.pytype/
|
|
136
|
+
|
|
137
|
+
# Cython debug symbols
|
|
138
|
+
cython_debug/
|
|
139
|
+
|
|
140
|
+
# setuptools_scm
|
|
141
|
+
src/*/_version.py
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
# ruff
|
|
145
|
+
.ruff_cache/
|
|
146
|
+
|
|
147
|
+
# OS specific stuff
|
|
148
|
+
.DS_Store
|
|
149
|
+
.DS_Store?
|
|
150
|
+
._*
|
|
151
|
+
.Spotlight-V100
|
|
152
|
+
.Trashes
|
|
153
|
+
ehthumbs.db
|
|
154
|
+
Thumbs.db
|
|
155
|
+
|
|
156
|
+
# Common editor files
|
|
157
|
+
*~
|
|
158
|
+
*.swp
|
|
159
|
+
/scratch
|
|
160
|
+
/notebooks
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
ci:
|
|
2
|
+
autoupdate_commit_msg: "chore: update pre-commit hooks"
|
|
3
|
+
autofix_commit_msg: "style: pre-commit fixes"
|
|
4
|
+
|
|
5
|
+
default_stages: [pre-commit, pre-push]
|
|
6
|
+
|
|
7
|
+
repos:
|
|
8
|
+
- repo: https://github.com/commitizen-tools/commitizen
|
|
9
|
+
rev: v3.27.0
|
|
10
|
+
hooks:
|
|
11
|
+
- id: commitizen
|
|
12
|
+
# - id: commitizen-branch
|
|
13
|
+
# stages: [push]
|
|
14
|
+
|
|
15
|
+
- repo: meta
|
|
16
|
+
hooks:
|
|
17
|
+
- id: check-useless-excludes
|
|
18
|
+
|
|
19
|
+
- repo: https://github.com/scientific-python/cookie
|
|
20
|
+
rev: 2024.04.23
|
|
21
|
+
hooks:
|
|
22
|
+
- id: sp-repo-review
|
|
23
|
+
|
|
24
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
25
|
+
rev: "v4.6.0"
|
|
26
|
+
hooks:
|
|
27
|
+
- id: check-added-large-files
|
|
28
|
+
- id: check-case-conflict
|
|
29
|
+
- id: check-merge-conflict
|
|
30
|
+
- id: check-yaml
|
|
31
|
+
- id: debug-statements
|
|
32
|
+
- id: end-of-file-fixer
|
|
33
|
+
- id: mixed-line-ending
|
|
34
|
+
- id: name-tests-test
|
|
35
|
+
args: ["--pytest-test-first"]
|
|
36
|
+
exclude: '^tests\/.*_helper\.py$'
|
|
37
|
+
- id: trailing-whitespace
|
|
38
|
+
|
|
39
|
+
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
40
|
+
rev: "v1.10.0"
|
|
41
|
+
hooks:
|
|
42
|
+
- id: rst-backticks
|
|
43
|
+
- id: rst-directive-colons
|
|
44
|
+
- id: rst-inline-touching-normal
|
|
45
|
+
|
|
46
|
+
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
47
|
+
rev: 0.28.4
|
|
48
|
+
hooks:
|
|
49
|
+
- id: check-dependabot
|
|
50
|
+
- id: check-github-workflows
|
|
51
|
+
- id: check-readthedocs
|
|
52
|
+
|
|
53
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
54
|
+
rev: "v0.4.7"
|
|
55
|
+
hooks:
|
|
56
|
+
# Run the linter
|
|
57
|
+
- id: ruff
|
|
58
|
+
types_or: [python, pyi, jupyter]
|
|
59
|
+
args: ["--fix", "--show-fixes"]
|
|
60
|
+
# Run the formatter
|
|
61
|
+
- id: ruff-format
|
|
62
|
+
types_or: [python, pyi, jupyter]
|
|
63
|
+
|
|
64
|
+
- repo: https://github.com/adamchainz/blacken-docs
|
|
65
|
+
rev: "1.16.0"
|
|
66
|
+
hooks:
|
|
67
|
+
- id: blacken-docs
|
|
68
|
+
additional_dependencies: [black==24.*]
|
|
69
|
+
|
|
70
|
+
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
71
|
+
rev: "v4.0.0-alpha.8"
|
|
72
|
+
hooks:
|
|
73
|
+
- id: prettier
|
|
74
|
+
types_or: [yaml, markdown, html, css, scss, javascript, json]
|
|
75
|
+
args: [--prose-wrap=always]
|
|
76
|
+
|
|
77
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
78
|
+
rev: "v1.10.0"
|
|
79
|
+
hooks:
|
|
80
|
+
- id: mypy
|
|
81
|
+
files: src
|
|
82
|
+
exclude: ^(src/galax/__init__\.py|src/galax/.*?/__init__\.py)$
|
|
83
|
+
additional_dependencies:
|
|
84
|
+
- pytest
|
|
85
|
+
|
|
86
|
+
- repo: https://github.com/codespell-project/codespell
|
|
87
|
+
rev: "v2.3.0"
|
|
88
|
+
hooks:
|
|
89
|
+
- id: codespell
|
|
90
|
+
exclude: ^(notebooks|AUTHORS\.rst)$
|
|
91
|
+
|
|
92
|
+
- repo: https://github.com/abravalheri/validate-pyproject
|
|
93
|
+
rev: "v0.18"
|
|
94
|
+
hooks:
|
|
95
|
+
- id: validate-pyproject
|
|
96
|
+
additional_dependencies: ["validate-pyproject-schema-store[all]"]
|
|
97
|
+
|
|
98
|
+
- repo: local
|
|
99
|
+
hooks:
|
|
100
|
+
- id: disallow-caps
|
|
101
|
+
name: Disallow improper capitalization
|
|
102
|
+
language: pygrep
|
|
103
|
+
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest
|
|
104
|
+
exclude: .pre-commit-config.yaml
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Read the Docs configuration file
|
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
3
|
+
|
|
4
|
+
version: 2
|
|
5
|
+
|
|
6
|
+
build:
|
|
7
|
+
os: ubuntu-22.04
|
|
8
|
+
tools:
|
|
9
|
+
python: "3.11"
|
|
10
|
+
sphinx:
|
|
11
|
+
configuration: docs/conf.py
|
|
12
|
+
|
|
13
|
+
python:
|
|
14
|
+
install:
|
|
15
|
+
- method: pip
|
|
16
|
+
path: .
|
|
17
|
+
extra_requirements:
|
|
18
|
+
- docs
|
galax-0.0.2/AUTHORS.rst
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
**Main authors (alphabetical last name):**
|
|
2
|
+
|
|
3
|
+
* Jacob Nibauer
|
|
4
|
+
* Adrian Price-Whelan (`@adrn <https://github.com/adrn>`_)
|
|
5
|
+
* Nathaniel Starkman (`@nstarman <https://github.com/nstarman>`_)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
All contributors to :mod:`galax` (alphabetical last name):
|
|
9
|
+
|
|
10
|
+
* Jacob Nibauer
|
|
11
|
+
* Nathaniel Starkman
|
|
12
|
+
* Adrian Price-Whelan
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
All contributors to :mod:`gala` (alphabetical last name):
|
|
16
|
+
|
|
17
|
+
* Dan Foreman-Mackey
|
|
18
|
+
* Nico Garavito-Camargo
|
|
19
|
+
* Johnny Greco
|
|
20
|
+
* Akeem Hart
|
|
21
|
+
* Sergey Koposov
|
|
22
|
+
* Daniel Lenz
|
|
23
|
+
* Sophia Lilleengen
|
|
24
|
+
* Pey Lian Lim
|
|
25
|
+
* Syrtis Major
|
|
26
|
+
* Semyeong Oh
|
|
27
|
+
* Adrian Price-Whelan
|
|
28
|
+
* Brigitta Sipőcz
|
|
29
|
+
* Nathaniel Starkman
|
|
30
|
+
* Tom Wagg
|
galax-0.0.2/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright 2023 galax maintainers
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
7
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
8
|
+
so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|