JimGW 0.4.1__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.
- jimgw-0.4.1/.gitattributes +4 -0
- jimgw-0.4.1/.github/workflows/CI.yml +137 -0
- jimgw-0.4.1/.github/workflows/docs.yml +118 -0
- jimgw-0.4.1/.github/workflows/pre-commit-autoupdate.yml +32 -0
- jimgw-0.4.1/.gitignore +154 -0
- jimgw-0.4.1/.pre-commit-config.yaml +26 -0
- jimgw-0.4.1/CODE_OF_CONDUCT.md +83 -0
- jimgw-0.4.1/CONTRIBUTING.md +40 -0
- jimgw-0.4.1/LICENSE +22 -0
- jimgw-0.4.1/PKG-INFO +135 -0
- jimgw-0.4.1/README.md +71 -0
- jimgw-0.4.1/docs/.gitignore +2 -0
- jimgw-0.4.1/docs/FAQ.md +102 -0
- jimgw-0.4.1/docs/citing.md +26 -0
- jimgw-0.4.1/docs/dev/blackjax_followups.md +52 -0
- jimgw-0.4.1/docs/gen_api.py +246 -0
- jimgw-0.4.1/docs/guides/cli.md +392 -0
- jimgw-0.4.1/docs/guides/data.md +208 -0
- jimgw-0.4.1/docs/guides/index.md +10 -0
- jimgw-0.4.1/docs/guides/likelihood.md +236 -0
- jimgw-0.4.1/docs/guides/prior.md +144 -0
- jimgw-0.4.1/docs/guides/samplers.md +386 -0
- jimgw-0.4.1/docs/guides/transforms.md +226 -0
- jimgw-0.4.1/docs/index.md +25 -0
- jimgw-0.4.1/docs/installation.md +51 -0
- jimgw-0.4.1/docs/javascripts/mathjax.js +28 -0
- jimgw-0.4.1/docs/quickstart.md +157 -0
- jimgw-0.4.1/docs/tutorials/getting_started.ipynb +322 -0
- jimgw-0.4.1/docs/tutorials/gw150914_cli.md +212 -0
- jimgw-0.4.1/docs/tutorials/index.md +5 -0
- jimgw-0.4.1/examples/.gitignore +5 -0
- jimgw-0.4.1/examples/GW150914_NSS.py +147 -0
- jimgw-0.4.1/examples/GW150914_NS_AW.py +243 -0
- jimgw-0.4.1/examples/GW150914_SMC.py +146 -0
- jimgw-0.4.1/examples/GW150914_flowMC.py +149 -0
- jimgw-0.4.1/examples/GW170817_heterodyne.py +166 -0
- jimgw-0.4.1/examples/GW170817_multiband.py +162 -0
- jimgw-0.4.1/examples/README.md +23 -0
- jimgw-0.4.1/examples/cli/.gitignore +1 -0
- jimgw-0.4.1/examples/cli/GW150914_flowmc.toml +44 -0
- jimgw-0.4.1/examples/cli/README.md +13 -0
- jimgw-0.4.1/examples/cli/injection_flowmc.toml +57 -0
- jimgw-0.4.1/examples/injection.py +179 -0
- jimgw-0.4.1/pyproject.toml +120 -0
- jimgw-0.4.1/src/jimgw/__init__.py +20 -0
- jimgw-0.4.1/src/jimgw/_logging.py +19 -0
- jimgw-0.4.1/src/jimgw/cli/__init__.py +267 -0
- jimgw-0.4.1/src/jimgw/cli/_config.py +651 -0
- jimgw-0.4.1/src/jimgw/cli/_data.py +135 -0
- jimgw-0.4.1/src/jimgw/cli/_jim.py +52 -0
- jimgw-0.4.1/src/jimgw/cli/_likelihood.py +232 -0
- jimgw-0.4.1/src/jimgw/cli/_output.py +184 -0
- jimgw-0.4.1/src/jimgw/cli/_prior.py +131 -0
- jimgw-0.4.1/src/jimgw/cli/_transforms.py +445 -0
- jimgw-0.4.1/src/jimgw/cli/_utils.py +26 -0
- jimgw-0.4.1/src/jimgw/cli/_waveform.py +40 -0
- jimgw-0.4.1/src/jimgw/core/__init__.py +1 -0
- jimgw-0.4.1/src/jimgw/core/base.py +50 -0
- jimgw-0.4.1/src/jimgw/core/constants.py +32 -0
- jimgw-0.4.1/src/jimgw/core/jim.py +535 -0
- jimgw-0.4.1/src/jimgw/core/prior.py +728 -0
- jimgw-0.4.1/src/jimgw/core/single_event/__init__.py +0 -0
- jimgw-0.4.1/src/jimgw/core/single_event/data.py +804 -0
- jimgw-0.4.1/src/jimgw/core/single_event/detector.py +913 -0
- jimgw-0.4.1/src/jimgw/core/single_event/likelihood.py +1752 -0
- jimgw-0.4.1/src/jimgw/core/single_event/marginalization_config.py +29 -0
- jimgw-0.4.1/src/jimgw/core/single_event/polarization.py +88 -0
- jimgw-0.4.1/src/jimgw/core/single_event/prior.py +33 -0
- jimgw-0.4.1/src/jimgw/core/single_event/time_utils.py +271 -0
- jimgw-0.4.1/src/jimgw/core/single_event/transform_utils.py +653 -0
- jimgw-0.4.1/src/jimgw/core/single_event/transforms.py +649 -0
- jimgw-0.4.1/src/jimgw/core/single_event/utils.py +121 -0
- jimgw-0.4.1/src/jimgw/core/single_event/waveform.py +39 -0
- jimgw-0.4.1/src/jimgw/core/transforms.py +882 -0
- jimgw-0.4.1/src/jimgw/core/utils.py +111 -0
- jimgw-0.4.1/src/jimgw/samplers/__init__.py +137 -0
- jimgw-0.4.1/src/jimgw/samplers/base.py +121 -0
- jimgw-0.4.1/src/jimgw/samplers/blackjax/__init__.py +5 -0
- jimgw-0.4.1/src/jimgw/samplers/blackjax/_acceptance_walk_kernel.py +391 -0
- jimgw-0.4.1/src/jimgw/samplers/blackjax/_imports.py +31 -0
- jimgw-0.4.1/src/jimgw/samplers/blackjax/ns_aw.py +309 -0
- jimgw-0.4.1/src/jimgw/samplers/blackjax/nss.py +300 -0
- jimgw-0.4.1/src/jimgw/samplers/blackjax/smc.py +881 -0
- jimgw-0.4.1/src/jimgw/samplers/config.py +466 -0
- jimgw-0.4.1/src/jimgw/samplers/flowmc.py +326 -0
- jimgw-0.4.1/src/jimgw/samplers/periodic.py +140 -0
- jimgw-0.4.1/src/jimgw/typing.py +10 -0
- jimgw-0.4.1/tests/__init__.py +0 -0
- jimgw-0.4.1/tests/conftest.py +3 -0
- jimgw-0.4.1/tests/cross_validation/.gitignore +1 -0
- jimgw-0.4.1/tests/cross_validation/__init__.py +0 -0
- jimgw-0.4.1/tests/cross_validation/test_likelihood.py +833 -0
- jimgw-0.4.1/tests/cross_validation/test_sky_transforms.py +413 -0
- jimgw-0.4.1/tests/cross_validation/test_spin_transforms.py +413 -0
- jimgw-0.4.1/tests/cross_validation/verify_gmst_calculations.py +217 -0
- jimgw-0.4.1/tests/fixtures/GW150914_psd_H1.npz +0 -0
- jimgw-0.4.1/tests/fixtures/GW150914_psd_L1.npz +0 -0
- jimgw-0.4.1/tests/fixtures/GW150914_strain_H1.npz +0 -0
- jimgw-0.4.1/tests/fixtures/GW150914_strain_L1.npz +0 -0
- jimgw-0.4.1/tests/fixtures/GW150914_test.toml +49 -0
- jimgw-0.4.1/tests/fixtures/README.md +40 -0
- jimgw-0.4.1/tests/fixtures/__init__.py +0 -0
- jimgw-0.4.1/tests/fixtures/generate_fixtures.py +44 -0
- jimgw-0.4.1/tests/integration/.gitignore +2 -0
- jimgw-0.4.1/tests/integration/__init__.py +0 -0
- jimgw-0.4.1/tests/integration/_helpers.py +36 -0
- jimgw-0.4.1/tests/integration/test_GW150914_D.py +86 -0
- jimgw-0.4.1/tests/integration/test_GW150914_D_heterodyne.py +94 -0
- jimgw-0.4.1/tests/integration/test_GW150914_Pv2.py +94 -0
- jimgw-0.4.1/tests/integration/test_cli_run.py +117 -0
- jimgw-0.4.1/tests/integration/test_sampler_flowmc.py +48 -0
- jimgw-0.4.1/tests/integration/test_sampler_ns_aw.py +42 -0
- jimgw-0.4.1/tests/integration/test_sampler_nss.py +45 -0
- jimgw-0.4.1/tests/integration/test_sampler_smc.py +61 -0
- jimgw-0.4.1/tests/unit/__init__.py +0 -0
- jimgw-0.4.1/tests/unit/cli/__init__.py +0 -0
- jimgw-0.4.1/tests/unit/cli/test_config.py +379 -0
- jimgw-0.4.1/tests/unit/cli/test_transforms.py +495 -0
- jimgw-0.4.1/tests/unit/core/__init__.py +0 -0
- jimgw-0.4.1/tests/unit/core/single_event/__init__.py +0 -0
- jimgw-0.4.1/tests/unit/core/single_event/test_data.py +510 -0
- jimgw-0.4.1/tests/unit/core/single_event/test_detector.py +201 -0
- jimgw-0.4.1/tests/unit/core/single_event/test_likelihood.py +1435 -0
- jimgw-0.4.1/tests/unit/core/single_event/test_polarization.py +161 -0
- jimgw-0.4.1/tests/unit/core/single_event/test_transforms.py +1067 -0
- jimgw-0.4.1/tests/unit/core/single_event/test_waveform.py +318 -0
- jimgw-0.4.1/tests/unit/core/test_jim.py +785 -0
- jimgw-0.4.1/tests/unit/core/test_prior.py +396 -0
- jimgw-0.4.1/tests/unit/core/test_transforms.py +364 -0
- jimgw-0.4.1/tests/unit/samplers/__init__.py +0 -0
- jimgw-0.4.1/tests/unit/samplers/blackjax/__init__.py +0 -0
- jimgw-0.4.1/tests/unit/samplers/blackjax/test_imports.py +43 -0
- jimgw-0.4.1/tests/unit/samplers/blackjax/test_ns_aw.py +281 -0
- jimgw-0.4.1/tests/unit/samplers/blackjax/test_ns_aw_validation.py +83 -0
- jimgw-0.4.1/tests/unit/samplers/blackjax/test_nss.py +258 -0
- jimgw-0.4.1/tests/unit/samplers/blackjax/test_smc.py +502 -0
- jimgw-0.4.1/tests/unit/samplers/test_base.py +191 -0
- jimgw-0.4.1/tests/unit/samplers/test_config.py +359 -0
- jimgw-0.4.1/tests/unit/samplers/test_flowmc.py +276 -0
- jimgw-0.4.1/tests/unit/samplers/test_periodic.py +136 -0
- jimgw-0.4.1/tests/unit/samplers/test_registry.py +106 -0
- jimgw-0.4.1/tests/utils.py +81 -0
- jimgw-0.4.1/uv.lock +4219 -0
- jimgw-0.4.1/zensical.toml +85 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main, jim-dev]
|
|
6
|
+
push:
|
|
7
|
+
branches: [main, jim-dev]
|
|
8
|
+
release:
|
|
9
|
+
types: [published]
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
strategy:
|
|
19
|
+
matrix:
|
|
20
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v6
|
|
23
|
+
- uses: astral-sh/setup-uv@v7
|
|
24
|
+
with:
|
|
25
|
+
enable-cache: true
|
|
26
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
27
|
+
run: uv python install ${{ matrix.python-version }}
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: |
|
|
30
|
+
uv sync --python ${{ matrix.python-version }} --group test --group cross-validation --group nested-sampling
|
|
31
|
+
if [[ "${{ github.ref }}" == "refs/heads/jim-dev" || "${{ github.base_ref }}" == "jim-dev" ]]; then
|
|
32
|
+
uv pip install git+https://github.com/GW-JAX-Team/flowMC.git@flowMC-dev
|
|
33
|
+
uv pip install git+https://github.com/GW-JAX-Team/ripple.git@ripple-dev
|
|
34
|
+
uv pip install git+https://github.com/GW-JAX-Team/blackjax.git@jim-dev
|
|
35
|
+
elif [[ "${{ github.event_name }}" != "release" ]]; then
|
|
36
|
+
uv pip install git+https://github.com/GW-JAX-Team/flowMC.git@main
|
|
37
|
+
uv pip install git+https://github.com/GW-JAX-Team/ripple.git@main
|
|
38
|
+
fi
|
|
39
|
+
- name: Run tests
|
|
40
|
+
run: |
|
|
41
|
+
is_main=false
|
|
42
|
+
[[ "${{ github.ref }}" == "refs/heads/main" || "${{ github.base_ref }}" == "main" ]] && is_main=true
|
|
43
|
+
cov_flags=""
|
|
44
|
+
[[ "${{ matrix.python-version }}" == "3.12" ]] && cov_flags="--cov=jimgw --cov-report=term-missing"
|
|
45
|
+
if [[ "$is_main" == "true" ]]; then
|
|
46
|
+
uv run --no-sync pytest $cov_flags tests -v --tb=short
|
|
47
|
+
else
|
|
48
|
+
uv run --no-sync pytest -m "not slow and not integration" $cov_flags tests
|
|
49
|
+
fi
|
|
50
|
+
- name: Upload coverage to Coveralls
|
|
51
|
+
if: matrix.python-version == '3.12'
|
|
52
|
+
env:
|
|
53
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
54
|
+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
55
|
+
run: uv run --no-sync coveralls
|
|
56
|
+
|
|
57
|
+
pre-commit:
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v6
|
|
61
|
+
- uses: astral-sh/setup-uv@v7
|
|
62
|
+
with:
|
|
63
|
+
enable-cache: true
|
|
64
|
+
- name: Install dependencies
|
|
65
|
+
run: |
|
|
66
|
+
uv sync --python 3.12 --group test
|
|
67
|
+
if [[ "${{ github.ref }}" == "refs/heads/jim-dev" || "${{ github.base_ref }}" == "jim-dev" ]]; then
|
|
68
|
+
uv pip install git+https://github.com/GW-JAX-Team/flowMC.git@flowMC-dev
|
|
69
|
+
uv pip install git+https://github.com/GW-JAX-Team/ripple.git@ripple-dev
|
|
70
|
+
elif [[ "${{ github.event_name }}" != "release" ]]; then
|
|
71
|
+
uv pip install git+https://github.com/GW-JAX-Team/flowMC.git@main
|
|
72
|
+
uv pip install git+https://github.com/GW-JAX-Team/ripple.git@main
|
|
73
|
+
fi
|
|
74
|
+
- name: Run pre-commit (excluding pyright)
|
|
75
|
+
run: SKIP=pyright uv run --no-sync pre-commit run --all-files
|
|
76
|
+
- name: Run pyright
|
|
77
|
+
run: uv run --no-sync pyright src/
|
|
78
|
+
|
|
79
|
+
publish:
|
|
80
|
+
needs: [test, pre-commit]
|
|
81
|
+
runs-on: ubuntu-latest
|
|
82
|
+
if: github.event_name == 'release'
|
|
83
|
+
environment:
|
|
84
|
+
name: pypi
|
|
85
|
+
url: https://pypi.org/project/jimgw/
|
|
86
|
+
steps:
|
|
87
|
+
- uses: actions/checkout@v6
|
|
88
|
+
with:
|
|
89
|
+
fetch-depth: 0
|
|
90
|
+
- uses: astral-sh/setup-uv@v7
|
|
91
|
+
- name: Build package
|
|
92
|
+
run: uv build
|
|
93
|
+
- name: Publish to PyPI
|
|
94
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
95
|
+
with:
|
|
96
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
97
|
+
|
|
98
|
+
tag-dev:
|
|
99
|
+
needs: [publish]
|
|
100
|
+
runs-on: ubuntu-latest
|
|
101
|
+
permissions:
|
|
102
|
+
contents: write
|
|
103
|
+
steps:
|
|
104
|
+
- uses: actions/checkout@v6
|
|
105
|
+
with:
|
|
106
|
+
ref: jim-dev
|
|
107
|
+
- name: Tag jim-dev with next minor dev version
|
|
108
|
+
env:
|
|
109
|
+
TAG_NAME: ${{ github.event.release.tag_name }}
|
|
110
|
+
run: |
|
|
111
|
+
VERSION="${TAG_NAME#v}"
|
|
112
|
+
IFS='.' read -r major minor patch <<< "$VERSION"
|
|
113
|
+
NEXT="v${major}.$((minor + 1)).0.dev0"
|
|
114
|
+
git tag --force "$NEXT"
|
|
115
|
+
git push --force origin "$NEXT"
|
|
116
|
+
|
|
117
|
+
publish-testpypi:
|
|
118
|
+
needs: [test, pre-commit]
|
|
119
|
+
runs-on: ubuntu-latest
|
|
120
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
121
|
+
environment:
|
|
122
|
+
name: testpypi
|
|
123
|
+
url: https://test.pypi.org/project/jimgw/
|
|
124
|
+
steps:
|
|
125
|
+
- uses: actions/checkout@v6
|
|
126
|
+
with:
|
|
127
|
+
fetch-depth: 0
|
|
128
|
+
persist-credentials: false
|
|
129
|
+
- uses: astral-sh/setup-uv@v7
|
|
130
|
+
- name: Build package
|
|
131
|
+
run: uv build
|
|
132
|
+
- name: Publish to TestPyPI
|
|
133
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
134
|
+
with:
|
|
135
|
+
repository-url: https://test.pypi.org/legacy/
|
|
136
|
+
password: ${{ secrets.TESTPYPI_API_TOKEN }}
|
|
137
|
+
skip-existing: true
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, jim-dev]
|
|
6
|
+
tags: ['v*']
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ${{ github.workflow }}
|
|
10
|
+
cancel-in-progress: false
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
deploy:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
fetch-depth: 0
|
|
22
|
+
|
|
23
|
+
- uses: astral-sh/setup-uv@v7
|
|
24
|
+
with:
|
|
25
|
+
enable-cache: true
|
|
26
|
+
|
|
27
|
+
- name: Set up Python
|
|
28
|
+
run: uv python install 3.12
|
|
29
|
+
|
|
30
|
+
- name: Install doc dependencies
|
|
31
|
+
run: uv sync --group doc
|
|
32
|
+
|
|
33
|
+
- name: Determine version
|
|
34
|
+
id: version
|
|
35
|
+
run: |
|
|
36
|
+
if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then
|
|
37
|
+
echo "alias=stable" >> "$GITHUB_OUTPUT"
|
|
38
|
+
elif [[ "${GITHUB_REF}" == refs/heads/main ]]; then
|
|
39
|
+
echo "alias=latest" >> "$GITHUB_OUTPUT"
|
|
40
|
+
else
|
|
41
|
+
echo "alias=development" >> "$GITHUB_OUTPUT"
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
- name: Convert notebooks to Markdown
|
|
45
|
+
run: |
|
|
46
|
+
for nb in docs/tutorials/*.ipynb; do
|
|
47
|
+
[ -f "$nb" ] && uv run jupyter nbconvert --to markdown "$nb"
|
|
48
|
+
done
|
|
49
|
+
|
|
50
|
+
- name: Generate API stubs and versioned config
|
|
51
|
+
env:
|
|
52
|
+
VERSION_ALIAS: ${{ steps.version.outputs.alias }}
|
|
53
|
+
run: uv run python docs/gen_api.py
|
|
54
|
+
|
|
55
|
+
- name: Build docs
|
|
56
|
+
run: uv run zensical build -f _zensical_build.toml --clean
|
|
57
|
+
|
|
58
|
+
- name: Configure git
|
|
59
|
+
run: |
|
|
60
|
+
git config user.name "github-actions[bot]"
|
|
61
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
62
|
+
|
|
63
|
+
- name: Deploy to gh-pages
|
|
64
|
+
env:
|
|
65
|
+
VERSION: ${{ steps.version.outputs.alias }}
|
|
66
|
+
run: |
|
|
67
|
+
mv site /tmp/docs-built
|
|
68
|
+
rm -f /tmp/docs-built/.gitignore
|
|
69
|
+
git clean -fd
|
|
70
|
+
if git ls-remote --exit-code origin refs/heads/gh-pages > /dev/null 2>&1; then
|
|
71
|
+
git fetch origin gh-pages
|
|
72
|
+
git checkout gh-pages
|
|
73
|
+
else
|
|
74
|
+
git checkout --orphan gh-pages
|
|
75
|
+
git rm -rf . --quiet || true
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
rm -rf "${VERSION}"
|
|
79
|
+
cp -r /tmp/docs-built "${VERSION}"
|
|
80
|
+
|
|
81
|
+
case "$VERSION" in
|
|
82
|
+
stable) title="Stable" ;;
|
|
83
|
+
latest) title="Latest" ;;
|
|
84
|
+
development) title="Development" ;;
|
|
85
|
+
*) title="$VERSION" ;;
|
|
86
|
+
esac
|
|
87
|
+
[ -f versions.json ] || echo '[]' > versions.json
|
|
88
|
+
jq --arg v "$VERSION" --arg t "$title" \
|
|
89
|
+
'([.[] | select(.version != $v)] + [{"version": $v, "title": $t, "aliases": []}])
|
|
90
|
+
| sort_by(if .version == "stable" then 0
|
|
91
|
+
elif .version == "latest" then 1
|
|
92
|
+
elif .version == "development" then 2
|
|
93
|
+
else 99 end)' \
|
|
94
|
+
versions.json > versions.json.tmp
|
|
95
|
+
mv versions.json.tmp versions.json
|
|
96
|
+
|
|
97
|
+
cat > index.html << 'EOF'
|
|
98
|
+
<!doctype html>
|
|
99
|
+
<html><head><meta charset="utf-8"><title>Redirecting…</title>
|
|
100
|
+
<script>
|
|
101
|
+
fetch("versions.json").then(function(r){return r.json();}).then(function(vs){
|
|
102
|
+
var order=["stable","latest","development"];
|
|
103
|
+
var available=vs.map(function(v){return v.version;});
|
|
104
|
+
for(var i=0;i<order.length;i++){
|
|
105
|
+
if(available.indexOf(order[i])!==-1){
|
|
106
|
+
window.location.replace(order[i]+"/");return;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if(available.length>0)window.location.replace(available[0]+"/");
|
|
110
|
+
}).catch(function(){window.location.replace("stable/");});
|
|
111
|
+
</script>
|
|
112
|
+
</head><body>Redirecting…</body></html>
|
|
113
|
+
EOF
|
|
114
|
+
|
|
115
|
+
touch .nojekyll
|
|
116
|
+
git add -A
|
|
117
|
+
git diff --cached --quiet || git commit -m "docs: deploy ${VERSION} [skip ci]"
|
|
118
|
+
git push origin gh-pages
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: pre-commit autoupdate
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "0 6 * * 1" # 7am CET (UTC+1, winter) / 8am CEST (UTC+2, summer)
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
autoupdate:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
with:
|
|
16
|
+
ref: jim-dev
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.x"
|
|
20
|
+
- run: pip install pre-commit
|
|
21
|
+
- run: pre-commit autoupdate
|
|
22
|
+
- name: Commit if hooks changed
|
|
23
|
+
run: |
|
|
24
|
+
if git diff --quiet; then
|
|
25
|
+
echo "All hooks up to date"
|
|
26
|
+
exit 0
|
|
27
|
+
fi
|
|
28
|
+
git config user.name "github-actions[bot]"
|
|
29
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
30
|
+
git add .pre-commit-config.yaml
|
|
31
|
+
git commit -m "[pre-commit] autoupdate hook versions"
|
|
32
|
+
git push || exit 1
|
jimgw-0.4.1/.gitignore
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
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
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
*.manifest
|
|
32
|
+
*.spec
|
|
33
|
+
|
|
34
|
+
# Installer logs
|
|
35
|
+
pip-log.txt
|
|
36
|
+
pip-delete-this-directory.txt
|
|
37
|
+
|
|
38
|
+
# Unit test / coverage reports
|
|
39
|
+
htmlcov/
|
|
40
|
+
.tox/
|
|
41
|
+
.nox/
|
|
42
|
+
.coverage
|
|
43
|
+
.coverage.*
|
|
44
|
+
.cache
|
|
45
|
+
nosetests.xml
|
|
46
|
+
coverage.xml
|
|
47
|
+
*.cover
|
|
48
|
+
*.py,cover
|
|
49
|
+
.hypothesis/
|
|
50
|
+
.pytest_cache/
|
|
51
|
+
|
|
52
|
+
# Translations
|
|
53
|
+
*.mo
|
|
54
|
+
*.pot
|
|
55
|
+
|
|
56
|
+
# Django stuff:
|
|
57
|
+
*.log
|
|
58
|
+
local_settings.py
|
|
59
|
+
db.sqlite3
|
|
60
|
+
db.sqlite3-journal
|
|
61
|
+
|
|
62
|
+
# Flask stuff:
|
|
63
|
+
instance/
|
|
64
|
+
.webassets-cache
|
|
65
|
+
|
|
66
|
+
# Scrapy stuff:
|
|
67
|
+
.scrapy
|
|
68
|
+
|
|
69
|
+
# Sphinx documentation
|
|
70
|
+
docs/_build/
|
|
71
|
+
|
|
72
|
+
# PyBuilder
|
|
73
|
+
target/
|
|
74
|
+
|
|
75
|
+
# Jupyter Notebook
|
|
76
|
+
.ipynb_checkpoints
|
|
77
|
+
|
|
78
|
+
# IPython
|
|
79
|
+
profile_default/
|
|
80
|
+
ipython_config.py
|
|
81
|
+
|
|
82
|
+
# pyenv
|
|
83
|
+
.python-version
|
|
84
|
+
|
|
85
|
+
# PEP 582
|
|
86
|
+
__pypackages__/
|
|
87
|
+
|
|
88
|
+
# Celery stuff
|
|
89
|
+
celerybeat-schedule
|
|
90
|
+
celerybeat.pid
|
|
91
|
+
|
|
92
|
+
# SageMath parsed files
|
|
93
|
+
*.sage.py
|
|
94
|
+
|
|
95
|
+
# Environments
|
|
96
|
+
.env
|
|
97
|
+
.venv
|
|
98
|
+
env/
|
|
99
|
+
venv/
|
|
100
|
+
ENV/
|
|
101
|
+
env.bak/
|
|
102
|
+
venv.bak/
|
|
103
|
+
|
|
104
|
+
# Spyder project settings
|
|
105
|
+
.spyderproject
|
|
106
|
+
.spyproject
|
|
107
|
+
|
|
108
|
+
# Rope project settings
|
|
109
|
+
.ropeproject
|
|
110
|
+
|
|
111
|
+
# mkdocs documentation
|
|
112
|
+
/site
|
|
113
|
+
|
|
114
|
+
# mypy
|
|
115
|
+
.mypy_cache/
|
|
116
|
+
.dmypy.json
|
|
117
|
+
dmypy.json
|
|
118
|
+
|
|
119
|
+
# Pyre type checker
|
|
120
|
+
.pyre/
|
|
121
|
+
|
|
122
|
+
# IDE / Editor
|
|
123
|
+
.vscode/
|
|
124
|
+
*.swp
|
|
125
|
+
|
|
126
|
+
# OS
|
|
127
|
+
.DS_Store
|
|
128
|
+
|
|
129
|
+
# Data files
|
|
130
|
+
data
|
|
131
|
+
*H1.txt
|
|
132
|
+
*L1.txt
|
|
133
|
+
*V1.txt
|
|
134
|
+
test_data
|
|
135
|
+
|
|
136
|
+
# Slurm
|
|
137
|
+
slurm_script*
|
|
138
|
+
|
|
139
|
+
# Build artifacts
|
|
140
|
+
build*
|
|
141
|
+
log*
|
|
142
|
+
|
|
143
|
+
# Out directory of runs
|
|
144
|
+
outdir
|
|
145
|
+
|
|
146
|
+
# Workspace files
|
|
147
|
+
jim.code-workspace
|
|
148
|
+
|
|
149
|
+
# Dagster
|
|
150
|
+
.tmp_dagster*
|
|
151
|
+
dagster_tmp/*
|
|
152
|
+
|
|
153
|
+
# Zensical generated files
|
|
154
|
+
_zensical_build.toml
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
ci:
|
|
2
|
+
autoupdate_branch: jim-dev
|
|
3
|
+
skip: [uv-lock, pyright]
|
|
4
|
+
|
|
5
|
+
repos:
|
|
6
|
+
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
7
|
+
rev: 0.11.19
|
|
8
|
+
hooks:
|
|
9
|
+
- id: uv-lock
|
|
10
|
+
args: ["--upgrade"]
|
|
11
|
+
|
|
12
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
13
|
+
rev: v0.15.16
|
|
14
|
+
hooks:
|
|
15
|
+
- id: ruff-check
|
|
16
|
+
args: ["--fix"]
|
|
17
|
+
files: src/
|
|
18
|
+
- id: ruff-format
|
|
19
|
+
files: src/
|
|
20
|
+
|
|
21
|
+
- repo: https://github.com/RobertCraigie/pyright-python
|
|
22
|
+
rev: v1.1.410
|
|
23
|
+
hooks:
|
|
24
|
+
- id: pyright
|
|
25
|
+
files: src/
|
|
26
|
+
additional_dependencies: ["astropy>=7.0.1", "beartype>=0.19.0", "evosax>=0.2.0", "flowMC>=0.6.1", "gwpy>=3.0.12", "jax>=0.8.2", "jaxtyping>=0.3.3", pytest, "ripplegw>=0.2.1", typing_extensions, "blackjax@git+https://github.com/GW-JAX-Team/blackjax.git@jim", "pydantic>=2", "anesthetic>=2", "tomli-w>=1.0", "typer>=0.12"]
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We pledge to make our community welcoming, safe, and equitable for all.
|
|
6
|
+
|
|
7
|
+
We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
|
|
8
|
+
|
|
9
|
+
## Encouraged Behaviors
|
|
10
|
+
|
|
11
|
+
While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
|
|
12
|
+
|
|
13
|
+
With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
|
|
14
|
+
|
|
15
|
+
1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
|
|
16
|
+
2. Engaging **kindly and honestly** with others.
|
|
17
|
+
3. Respecting **different viewpoints** and experiences.
|
|
18
|
+
4. **Taking responsibility** for our actions and contributions.
|
|
19
|
+
5. Gracefully giving and accepting **constructive feedback**.
|
|
20
|
+
6. Committing to **repairing harm** when it occurs.
|
|
21
|
+
7. Behaving in other ways that promote and sustain the **well-being of our community**.
|
|
22
|
+
|
|
23
|
+
## Restricted Behaviors
|
|
24
|
+
|
|
25
|
+
We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
|
|
26
|
+
|
|
27
|
+
1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
|
|
28
|
+
2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
|
|
29
|
+
3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable identities or traits.
|
|
30
|
+
4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
|
|
31
|
+
5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
|
|
32
|
+
6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
|
|
33
|
+
7. Behaving in other ways that **threaten the well-being** of our community.
|
|
34
|
+
|
|
35
|
+
### Other Restrictions
|
|
36
|
+
|
|
37
|
+
1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
|
|
38
|
+
2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
|
|
39
|
+
3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
|
|
40
|
+
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.
|
|
41
|
+
|
|
42
|
+
## Reporting an Issue
|
|
43
|
+
|
|
44
|
+
Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.
|
|
45
|
+
|
|
46
|
+
When an incident does occur, it is important to report it promptly. To report a possible violation, contact a maintainer privately with a brief description and any relevant links or context. Reports are handled confidentially, and we will respond as promptly as possible.
|
|
47
|
+
|
|
48
|
+
Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.
|
|
49
|
+
|
|
50
|
+
## Addressing and Repairing Harm
|
|
51
|
+
|
|
52
|
+
If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.
|
|
53
|
+
|
|
54
|
+
1) Warning
|
|
55
|
+
1) Event: A violation involving a single incident or series of incidents.
|
|
56
|
+
2) Consequence: A private, written warning from the Community Moderators.
|
|
57
|
+
3) Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
|
|
58
|
+
2) Temporarily Limited Activities
|
|
59
|
+
1) Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
|
|
60
|
+
2) Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
|
|
61
|
+
3) Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
|
|
62
|
+
3) Temporary Suspension
|
|
63
|
+
1) Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
|
|
64
|
+
2) Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
|
|
65
|
+
3) Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
|
|
66
|
+
4) Permanent Ban
|
|
67
|
+
1) Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
|
|
68
|
+
2) Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
|
|
69
|
+
3) Repair: There is no possible repair in cases of this severity.
|
|
70
|
+
|
|
71
|
+
This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.
|
|
72
|
+
|
|
73
|
+
## Scope
|
|
74
|
+
|
|
75
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
76
|
+
|
|
77
|
+
## Attribution
|
|
78
|
+
|
|
79
|
+
This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
|
|
80
|
+
|
|
81
|
+
Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
|
|
82
|
+
|
|
83
|
+
For answers to common questions about Contributor Covenant, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are provided at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Additional enforcement and community guideline resources can be found at [https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources). The enforcement ladder was inspired by the work of [Mozilla’s code of conduct team](https://github.com/mozilla/inclusion).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Contributions of any kind are welcome and appreciated.
|
|
4
|
+
See the guidelines below.
|
|
5
|
+
|
|
6
|
+
## Expectations
|
|
7
|
+
|
|
8
|
+
Jim is developed and maintained by the GW JAX Team and community contributors.
|
|
9
|
+
While we try to be responsive, we don’t always get to every issue immediately.
|
|
10
|
+
If it has been more than a week or two, feel free to ping the maintainers on the issue.
|
|
11
|
+
|
|
12
|
+
## Did you find a bug?
|
|
13
|
+
|
|
14
|
+
**Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/GW-JAX-Team/Jim/issues).
|
|
15
|
+
If you’re unable to find an
|
|
16
|
+
open issue addressing the problem, [open a new one](https://github.com/GW-JAX-Team/Jim/issues/new).
|
|
17
|
+
Be sure to include a **title and clear description**, as much relevant information as possible, and the simplest possible **code sample** demonstrating the expected behaviour that is not occurring.
|
|
18
|
+
|
|
19
|
+
## Did you write a patch that fixes a bug?
|
|
20
|
+
|
|
21
|
+
Open a new GitHub pull request with the patch.
|
|
22
|
+
Ensure the PR description clearly describes the problem and solution.
|
|
23
|
+
Include the relevant issue number if applicable.
|
|
24
|
+
|
|
25
|
+
## Do you intend to add a new feature or change an existing one?
|
|
26
|
+
|
|
27
|
+
Open a new GitHub pull request with the feature or change.
|
|
28
|
+
Please follow these principles:
|
|
29
|
+
|
|
30
|
+
1. New features should be JAX-compatible.
|
|
31
|
+
2. Lightweight and modular implementation is preferred.
|
|
32
|
+
3. Jim is a gravitational-wave inference toolkit. Waveform models belong in [ripple](https://github.com/GW-JAX-Team/ripple), and sampling algorithms belong in the respective sampler package.
|
|
33
|
+
|
|
34
|
+
If you are unsure whether a feature fits, open an issue first to discuss it with the maintainers.
|
|
35
|
+
|
|
36
|
+
## Do you intend to add an example or tutorial?
|
|
37
|
+
|
|
38
|
+
Open a new GitHub pull request with the example or tutorial.
|
|
39
|
+
The example should be self-contained and keep imports from other packages to a minimum.
|
|
40
|
+
Leave case-specific analysis details out.
|
jimgw-0.4.1/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Kaze Wong
|
|
4
|
+
Copyright (c) 2025 GW JAX Team
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|