jaxspec 0.2.1.dev2__tar.gz → 0.2.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.
- jaxspec-0.2.2/.dockerignore +14 -0
- jaxspec-0.2.2/.github/dependabot.yml +11 -0
- jaxspec-0.2.2/.github/workflows/documentation-links.yml +22 -0
- jaxspec-0.2.2/.github/workflows/publish.yml +21 -0
- jaxspec-0.2.2/.github/workflows/test-and-coverage.yml +49 -0
- jaxspec-0.2.2/.gitignore +200 -0
- jaxspec-0.2.2/.pre-commit-config.yaml +36 -0
- jaxspec-0.2.2/.readthedocs.yaml +42 -0
- jaxspec-0.2.2/CODE_OF_CONDUCT.md +128 -0
- jaxspec-0.2.2/Dockerfile +19 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/PKG-INFO +31 -37
- jaxspec-0.2.2/docs/contribute/index.md +51 -0
- jaxspec-0.2.2/docs/contribute/internal.md +23 -0
- jaxspec-0.2.2/docs/contribute/xspec.md +7 -0
- jaxspec-0.2.2/docs/css/material.css +44 -0
- jaxspec-0.2.2/docs/css/mkdocstrings.css +27 -0
- jaxspec-0.2.2/docs/css/xarray.css +46 -0
- jaxspec-0.2.2/docs/examples/background.md +89 -0
- jaxspec-0.2.2/docs/examples/build_model.md +155 -0
- jaxspec-0.2.2/docs/examples/fakeits.md +164 -0
- jaxspec-0.2.2/docs/examples/fitting_example.md +100 -0
- jaxspec-0.2.2/docs/examples/index.md +58 -0
- jaxspec-0.2.2/docs/examples/statics/background_comparison.png +0 -0
- jaxspec-0.2.2/docs/examples/statics/background_gp.png +0 -0
- jaxspec-0.2.2/docs/examples/statics/background_spectral.png +0 -0
- jaxspec-0.2.2/docs/examples/statics/fakeits.png +0 -0
- jaxspec-0.2.2/docs/examples/statics/fitting_example_corner.png +0 -0
- jaxspec-0.2.2/docs/examples/statics/fitting_example_ppc.png +0 -0
- jaxspec-0.2.2/docs/examples/statics/model.png +0 -0
- jaxspec-0.2.2/docs/examples/statics/rmf.png +0 -0
- jaxspec-0.2.2/docs/examples/statics/subtract_background.png +0 -0
- jaxspec-0.2.2/docs/examples/statics/subtract_background_with_errors.png +0 -0
- jaxspec-0.2.2/docs/faq/cookbook.md +98 -0
- jaxspec-0.2.2/docs/faq/index.md +41 -0
- jaxspec-0.2.2/docs/faq/statics/cstat_vs_chi2.png +0 -0
- jaxspec-0.2.2/docs/frontpage/installation.md +45 -0
- jaxspec-0.2.2/docs/index.md +62 -0
- jaxspec-0.2.2/docs/javascripts/mathjax.js +18 -0
- jaxspec-0.2.2/docs/logo/logo_small.svg +985 -0
- jaxspec-0.2.2/docs/logo/xifu_mini.svg +1 -0
- jaxspec-0.2.2/docs/references/abundance.md +4 -0
- jaxspec-0.2.2/docs/references/additive.md +6 -0
- jaxspec-0.2.2/docs/references/background.md +4 -0
- jaxspec-0.2.2/docs/references/data.md +36 -0
- jaxspec-0.2.2/docs/references/fitting.md +30 -0
- jaxspec-0.2.2/docs/references/integrate.md +1 -0
- jaxspec-0.2.2/docs/references/model.md +24 -0
- jaxspec-0.2.2/docs/references/multiplicative.md +6 -0
- jaxspec-0.2.2/docs/references/results.md +13 -0
- jaxspec-0.2.2/docs/runtime/diagram.txt +20 -0
- jaxspec-0.2.2/docs/runtime/result_table.txt +18 -0
- jaxspec-0.2.2/docs/runtime/various_model_graphs/diagram.txt +20 -0
- jaxspec-0.2.2/docs/runtime/various_model_graphs/model_complex.txt +20 -0
- jaxspec-0.2.2/docs/runtime/various_model_graphs/model_simple.txt +8 -0
- jaxspec-0.2.2/docs/theory/background.md +21 -0
- jaxspec-0.2.2/docs/theory/bayesian_inference.md +48 -0
- jaxspec-0.2.2/docs/theory/index.md +5 -0
- jaxspec-0.2.2/docs/theory/instrument.md +116 -0
- jaxspec-0.2.2/mkdocs.yml +181 -0
- jaxspec-0.2.2/pyproject.toml +125 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/analysis/results.py +10 -4
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/model/additive.py +6 -3
- jaxspec-0.2.2/src/jaxspec/util/__init__.py +0 -0
- jaxspec-0.2.2/tests/conftest.py +152 -0
- jaxspec-0.2.2/tests/data_files.yml +59 -0
- jaxspec-0.2.2/tests/data_hash.yml +40 -0
- jaxspec-0.2.2/tests/test_background.py +56 -0
- jaxspec-0.2.2/tests/test_bayesian_model.py +42 -0
- jaxspec-0.2.2/tests/test_bayesian_model_building.py +120 -0
- jaxspec-0.2.2/tests/test_fakeit.py +112 -0
- jaxspec-0.2.2/tests/test_instruments.py +179 -0
- jaxspec-0.2.2/tests/test_integrate.py +95 -0
- jaxspec-0.2.2/tests/test_mcmc.py +19 -0
- jaxspec-0.2.2/tests/test_misc.py +27 -0
- jaxspec-0.2.2/tests/test_models.py +60 -0
- jaxspec-0.2.2/tests/test_observation.py +13 -0
- jaxspec-0.2.2/tests/test_repr.py +3 -0
- jaxspec-0.2.2/tests/test_results.py +79 -0
- jaxspec-0.2.2/tests/test_xspec.py +80 -0
- jaxspec-0.2.2/tests/test_xspec_models.py +188 -0
- jaxspec-0.2.1.dev2/pyproject.toml +0 -118
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/LICENSE.md +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/README.md +0 -0
- /jaxspec-0.2.1.dev2/src/jaxspec/_fit/__init__.py → /jaxspec-0.2.2/docs/dev/index.md +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/__init__.py +0 -0
- {jaxspec-0.2.1.dev2/src/jaxspec/analysis → jaxspec-0.2.2/src/jaxspec/_fit}/__init__.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/_fit/_build_model.py +0 -0
- {jaxspec-0.2.1.dev2/src/jaxspec/model → jaxspec-0.2.2/src/jaxspec/analysis}/__init__.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/analysis/_plot.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/analysis/compare.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/data/__init__.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/data/instrument.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/data/obsconf.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/data/observation.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/data/ogip.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/data/util.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/fit.py +0 -0
- {jaxspec-0.2.1.dev2/src/jaxspec/scripts → jaxspec-0.2.2/src/jaxspec/model}/__init__.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/model/_graph_util.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/model/abc.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/model/background.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/model/list.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/model/multiplicative.py +0 -0
- {jaxspec-0.2.1.dev2/src/jaxspec/util → jaxspec-0.2.2/src/jaxspec/scripts}/__init__.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/scripts/debug.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/util/abundance.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/util/integrate.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/util/misc.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/util/online_storage.py +0 -0
- {jaxspec-0.2.1.dev2 → jaxspec-0.2.2}/src/jaxspec/util/typing.py +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "pip" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "weekly"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# .github/workflows/documentation-links.yml
|
|
2
|
+
|
|
3
|
+
name: readthedocs/actions
|
|
4
|
+
on:
|
|
5
|
+
pull_request_target:
|
|
6
|
+
types:
|
|
7
|
+
- opened
|
|
8
|
+
# Execute this action only on PRs that touch
|
|
9
|
+
# documentation files.
|
|
10
|
+
# paths:
|
|
11
|
+
# - "docs/**"
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
pull-requests: write
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
documentation-links:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: readthedocs/actions/preview@v1
|
|
21
|
+
with:
|
|
22
|
+
project-slug: "jaxspec"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Python package
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags:
|
|
5
|
+
- "v*.*.*"
|
|
6
|
+
jobs:
|
|
7
|
+
build:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v3
|
|
11
|
+
|
|
12
|
+
- name: Install the latest version of uv
|
|
13
|
+
uses: astral-sh/setup-uv@v5
|
|
14
|
+
with:
|
|
15
|
+
version: "latest"
|
|
16
|
+
|
|
17
|
+
- name: Build package
|
|
18
|
+
run: uv build
|
|
19
|
+
|
|
20
|
+
- name: Publish package
|
|
21
|
+
run: uv publish --token ${{ secrets.PYPI_TOKEN }}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Unit tests
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- main
|
|
6
|
+
paths-ignore:
|
|
7
|
+
- 'README.md'
|
|
8
|
+
pull_request:
|
|
9
|
+
paths-ignore:
|
|
10
|
+
- 'README.md'
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
tests:
|
|
17
|
+
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- name: Set up Python 3.12
|
|
23
|
+
uses: actions/setup-python@v4
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.12"
|
|
26
|
+
- uses: dorny/paths-filter@v3
|
|
27
|
+
id: filter
|
|
28
|
+
with:
|
|
29
|
+
filters: |
|
|
30
|
+
src:
|
|
31
|
+
- 'src/**'
|
|
32
|
+
pyproject:
|
|
33
|
+
- 'pyproject.toml'
|
|
34
|
+
|
|
35
|
+
- name: Build docker images
|
|
36
|
+
if: steps.filter.outputs.src == 'true' || steps.filter.outputs.pyproject == 'true'
|
|
37
|
+
run: docker build . -t xspec-tests
|
|
38
|
+
|
|
39
|
+
- name: Test with pytest
|
|
40
|
+
if: steps.filter.outputs.src == 'true' || steps.filter.outputs.pyproject == 'true'
|
|
41
|
+
run: docker run -t -v ./:/shared xspec-tests uv run pytest --cov jaxspec --cov-report xml:/shared/coverage.xml
|
|
42
|
+
|
|
43
|
+
- name: "Upload coverage to Codecov"
|
|
44
|
+
if: steps.filter.outputs.src == 'true'
|
|
45
|
+
uses: codecov/codecov-action@v4
|
|
46
|
+
with:
|
|
47
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
48
|
+
fail_ci_if_error: true
|
|
49
|
+
verbose: true
|
jaxspec-0.2.2/.gitignore
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
|
|
2
|
+
# Created by https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks
|
|
3
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=python,jupyternotebooks
|
|
4
|
+
|
|
5
|
+
### JupyterNotebooks ###
|
|
6
|
+
# gitignore template for Jupyter Notebooks
|
|
7
|
+
# website: http://jupyter.org/
|
|
8
|
+
|
|
9
|
+
main.py
|
|
10
|
+
doc_notebooks/
|
|
11
|
+
|
|
12
|
+
.ipynb_checkpoints
|
|
13
|
+
tests/data/
|
|
14
|
+
*.ipynb
|
|
15
|
+
poetry.lock
|
|
16
|
+
# IPython
|
|
17
|
+
profile_default/
|
|
18
|
+
ipython_config.py
|
|
19
|
+
|
|
20
|
+
# Remove previous ipynb_checkpoints
|
|
21
|
+
# git rm -r .ipynb_checkpoints/
|
|
22
|
+
|
|
23
|
+
### Python ###
|
|
24
|
+
# Byte-compiled / optimized / DLL files
|
|
25
|
+
__pycache__/
|
|
26
|
+
*.py[cod]
|
|
27
|
+
*$py.class
|
|
28
|
+
|
|
29
|
+
# C extensions
|
|
30
|
+
*.so
|
|
31
|
+
|
|
32
|
+
# Distribution / packaging
|
|
33
|
+
.Python
|
|
34
|
+
build/
|
|
35
|
+
develop-eggs/
|
|
36
|
+
dist/
|
|
37
|
+
downloads/
|
|
38
|
+
eggs/
|
|
39
|
+
.eggs/
|
|
40
|
+
lib/
|
|
41
|
+
lib64/
|
|
42
|
+
parts/
|
|
43
|
+
sdist/
|
|
44
|
+
var/
|
|
45
|
+
wheels/
|
|
46
|
+
share/python-wheels/
|
|
47
|
+
*.egg-info/
|
|
48
|
+
.installed.cfg
|
|
49
|
+
*.egg
|
|
50
|
+
MANIFEST
|
|
51
|
+
|
|
52
|
+
# PyInstaller
|
|
53
|
+
# Usually these files are written by a python gallery from a template
|
|
54
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
55
|
+
*.manifest
|
|
56
|
+
*.spec
|
|
57
|
+
|
|
58
|
+
# Installer logs
|
|
59
|
+
pip-log.txt
|
|
60
|
+
pip-delete-this-directory.txt
|
|
61
|
+
|
|
62
|
+
# Unit test / coverage reports
|
|
63
|
+
htmlcov/
|
|
64
|
+
.tox/
|
|
65
|
+
.nox/
|
|
66
|
+
.coverage
|
|
67
|
+
.coverage.*
|
|
68
|
+
.cache
|
|
69
|
+
nosetests.xml
|
|
70
|
+
coverage.xml
|
|
71
|
+
*.cover
|
|
72
|
+
*.py,cover
|
|
73
|
+
.hypothesis/
|
|
74
|
+
.pytest_cache/
|
|
75
|
+
cover/
|
|
76
|
+
|
|
77
|
+
# Translations
|
|
78
|
+
*.mo
|
|
79
|
+
*.pot
|
|
80
|
+
|
|
81
|
+
# Django stuff:
|
|
82
|
+
*.log
|
|
83
|
+
local_settings.py
|
|
84
|
+
db.sqlite3
|
|
85
|
+
db.sqlite3-journal
|
|
86
|
+
|
|
87
|
+
# Flask stuff:
|
|
88
|
+
instance/
|
|
89
|
+
.webassets-cache
|
|
90
|
+
|
|
91
|
+
# Scrapy stuff:
|
|
92
|
+
.scrapy
|
|
93
|
+
|
|
94
|
+
# Sphinx documentation
|
|
95
|
+
docs/_build/
|
|
96
|
+
|
|
97
|
+
# PyBuilder
|
|
98
|
+
.pybuilder/
|
|
99
|
+
target/
|
|
100
|
+
|
|
101
|
+
# Jupyter Notebook
|
|
102
|
+
|
|
103
|
+
# IPython
|
|
104
|
+
|
|
105
|
+
# pyenv
|
|
106
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
107
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
108
|
+
# .python-version
|
|
109
|
+
|
|
110
|
+
# pipenv
|
|
111
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
112
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
113
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
114
|
+
# install all needed dependencies.
|
|
115
|
+
#Pipfile.lock
|
|
116
|
+
|
|
117
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
118
|
+
__pypackages__/
|
|
119
|
+
|
|
120
|
+
# Celery stuff
|
|
121
|
+
celerybeat-schedule
|
|
122
|
+
celerybeat.pid
|
|
123
|
+
|
|
124
|
+
# SageMath parsed files
|
|
125
|
+
*.sage.py
|
|
126
|
+
|
|
127
|
+
# Environments
|
|
128
|
+
.env
|
|
129
|
+
.venv
|
|
130
|
+
env/
|
|
131
|
+
venv/
|
|
132
|
+
ENV/
|
|
133
|
+
env.bak/
|
|
134
|
+
venv.bak/
|
|
135
|
+
|
|
136
|
+
# Spyder project settings
|
|
137
|
+
.spyderproject
|
|
138
|
+
.spyproject
|
|
139
|
+
|
|
140
|
+
# Rope project settings
|
|
141
|
+
.ropeproject
|
|
142
|
+
|
|
143
|
+
# mkdocs documentation
|
|
144
|
+
/site
|
|
145
|
+
|
|
146
|
+
# mypy
|
|
147
|
+
.mypy_cache/
|
|
148
|
+
.dmypy.json
|
|
149
|
+
dmypy.json
|
|
150
|
+
|
|
151
|
+
# Pyre type checker
|
|
152
|
+
.pyre/
|
|
153
|
+
|
|
154
|
+
# pytype static type analyzer
|
|
155
|
+
.pytype/
|
|
156
|
+
|
|
157
|
+
# Cython debug symbols
|
|
158
|
+
cython_debug/
|
|
159
|
+
|
|
160
|
+
# pycharm files
|
|
161
|
+
.idea/
|
|
162
|
+
|
|
163
|
+
# Compiled source #
|
|
164
|
+
###################
|
|
165
|
+
*.com
|
|
166
|
+
*.class
|
|
167
|
+
*.dll
|
|
168
|
+
*.exe
|
|
169
|
+
*.o
|
|
170
|
+
*.so
|
|
171
|
+
|
|
172
|
+
# Packages #
|
|
173
|
+
############
|
|
174
|
+
# it's better to unpack these files and commit the raw source
|
|
175
|
+
# git has its own built in compression methods
|
|
176
|
+
*.7z
|
|
177
|
+
*.dmg
|
|
178
|
+
*.gz
|
|
179
|
+
*.iso
|
|
180
|
+
*.jar
|
|
181
|
+
*.rar
|
|
182
|
+
*.tar
|
|
183
|
+
*.zip
|
|
184
|
+
|
|
185
|
+
# Logs and databases #
|
|
186
|
+
######################
|
|
187
|
+
*.log
|
|
188
|
+
*.sql
|
|
189
|
+
*.sqlite
|
|
190
|
+
|
|
191
|
+
# OS generated files #
|
|
192
|
+
######################
|
|
193
|
+
.DS_Store
|
|
194
|
+
.DS_Store?
|
|
195
|
+
._*
|
|
196
|
+
.Spotlight-V100
|
|
197
|
+
.Trashes
|
|
198
|
+
ehthumbs.db
|
|
199
|
+
Thumbs.db
|
|
200
|
+
# End of https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
fail_fast: true
|
|
2
|
+
|
|
3
|
+
repos:
|
|
4
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
5
|
+
rev: v4.6.0
|
|
6
|
+
hooks:
|
|
7
|
+
# - id: check-added-large-files
|
|
8
|
+
# args: ["--maxkb=5000"]
|
|
9
|
+
- id: check-toml
|
|
10
|
+
- id: check-json
|
|
11
|
+
- id: check-symlinks
|
|
12
|
+
- id: debug-statements
|
|
13
|
+
- id: detect-private-key
|
|
14
|
+
- id: check-yaml
|
|
15
|
+
args:
|
|
16
|
+
- --unsafe
|
|
17
|
+
- id: trailing-whitespace
|
|
18
|
+
exclude: \.(fits|pha|arf|rmf)$ # Exclude .fits, .pha, .arf, .rmf files
|
|
19
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
20
|
+
# Ruff version.
|
|
21
|
+
rev: v0.4.6
|
|
22
|
+
hooks:
|
|
23
|
+
- id: ruff
|
|
24
|
+
args: ["--fix", "--output-format=full"]
|
|
25
|
+
exclude: ^docs/|\.(fits|pha|arf|rmf)$ # Exclude docs and .fits, .pha, .arf, .rmf files
|
|
26
|
+
- id: ruff-format
|
|
27
|
+
exclude: \.(fits|pha|arf|rmf)$ # Exclude .fits, .pha, .arf, .rmf files
|
|
28
|
+
|
|
29
|
+
# - repo: local
|
|
30
|
+
# hooks:
|
|
31
|
+
# - id: tests
|
|
32
|
+
# name: tests
|
|
33
|
+
# language: system
|
|
34
|
+
# types: [python]
|
|
35
|
+
# pass_filenames: false
|
|
36
|
+
# entry: poetry run pytest
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# .readthedocs.yaml
|
|
2
|
+
# Read the Docs configuration file
|
|
3
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
4
|
+
|
|
5
|
+
# Required
|
|
6
|
+
version: 2
|
|
7
|
+
|
|
8
|
+
# Set the version of Python and other tools you might need
|
|
9
|
+
build:
|
|
10
|
+
os: ubuntu-22.04
|
|
11
|
+
tools:
|
|
12
|
+
python: "3.11"
|
|
13
|
+
# These packages are needed to build docs with image optimization
|
|
14
|
+
jobs:
|
|
15
|
+
post_create_environment:
|
|
16
|
+
# Install uv
|
|
17
|
+
- pip install uv
|
|
18
|
+
post_install:
|
|
19
|
+
# Install dependencies with 'docs' dependency group
|
|
20
|
+
- uv pip install -r pyproject.toml
|
|
21
|
+
# Using insiders versions of mkdocs-material & mkdocstrings
|
|
22
|
+
- uv pip uninstall mkdocs-material # mkdocstrings mkdocstrings-python
|
|
23
|
+
- uv pip install git+https://$GH_TOKEN@github.com/squidfunk/mkdocs-material-insiders.git@9.5.36-insiders-4.53.13
|
|
24
|
+
- uv pip install mkdocstrings mkdocstrings-python
|
|
25
|
+
- uv pip install mkdocs-autorefs
|
|
26
|
+
- uv pip install mkdocs-jupyter # This is bugged, I enforced it manually, let's see if it works
|
|
27
|
+
|
|
28
|
+
apt_packages:
|
|
29
|
+
- libcairo2-dev
|
|
30
|
+
- libfreetype6-dev
|
|
31
|
+
- libffi-dev
|
|
32
|
+
- libjpeg-dev
|
|
33
|
+
- libpng-dev
|
|
34
|
+
- libz-dev
|
|
35
|
+
- pngquant
|
|
36
|
+
|
|
37
|
+
mkdocs:
|
|
38
|
+
configuration: mkdocs.yml
|
|
39
|
+
|
|
40
|
+
# If using Sphinx, optionally build your docs in additional formats such as PDF
|
|
41
|
+
formats:
|
|
42
|
+
- pdf
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
+
and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the
|
|
26
|
+
overall community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or
|
|
31
|
+
advances of any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email
|
|
35
|
+
address, without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official e-mail address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
sdupourque@irap.omp.eu.
|
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
+
|
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
68
|
+
|
|
69
|
+
## Enforcement Guidelines
|
|
70
|
+
|
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
+
|
|
74
|
+
### 1. Correction
|
|
75
|
+
|
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
+
unprofessional or unwelcome in the community.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
|
82
|
+
|
|
83
|
+
### 2. Warning
|
|
84
|
+
|
|
85
|
+
**Community Impact**: A violation through a single incident or series
|
|
86
|
+
of actions.
|
|
87
|
+
|
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
+
like social media. Violating these terms may lead to a temporary or
|
|
93
|
+
permanent ban.
|
|
94
|
+
|
|
95
|
+
### 3. Temporary Ban
|
|
96
|
+
|
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
|
98
|
+
sustained inappropriate behavior.
|
|
99
|
+
|
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
+
communication with the community for a specified period of time. No public or
|
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
+
Violating these terms may lead to a permanent ban.
|
|
105
|
+
|
|
106
|
+
### 4. Permanent Ban
|
|
107
|
+
|
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
+
|
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within
|
|
113
|
+
the community.
|
|
114
|
+
|
|
115
|
+
## Attribution
|
|
116
|
+
|
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
+
version 2.0, available at
|
|
119
|
+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
120
|
+
|
|
121
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
122
|
+
enforcement ladder](https://github.com/mozilla/diversity).
|
|
123
|
+
|
|
124
|
+
[homepage]: https://www.contributor-covenant.org
|
|
125
|
+
|
|
126
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
127
|
+
https://www.contributor-covenant.org/faq. Translations are available at
|
|
128
|
+
https://www.contributor-covenant.org/translations.
|
jaxspec-0.2.2/Dockerfile
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# syntax=docker/dockerfile:1
|
|
2
|
+
FROM renecoty/heasoft:v6.34
|
|
3
|
+
|
|
4
|
+
WORKDIR /jaxspec
|
|
5
|
+
|
|
6
|
+
USER root
|
|
7
|
+
# Project initialization:
|
|
8
|
+
RUN apt-get update && \
|
|
9
|
+
apt-get install -y git
|
|
10
|
+
|
|
11
|
+
RUN pip install uv
|
|
12
|
+
|
|
13
|
+
ADD src /jaxspec/src
|
|
14
|
+
ADD tests /jaxspec/tests
|
|
15
|
+
ADD pyproject.toml /jaxspec/pyproject.toml
|
|
16
|
+
ADD README.md /jaxspec/README.md
|
|
17
|
+
|
|
18
|
+
RUN uv sync --no-group docs --no-group dev --python 3.12
|
|
19
|
+
ENV PATH="/app/.venv/bin:$PATH"
|
|
@@ -1,42 +1,37 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: jaxspec
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: jaxspec is a bayesian spectral fitting library for X-ray astronomy.
|
|
5
|
-
License: MIT
|
|
6
|
-
Author: sdupourque
|
|
7
|
-
Author-email: sdupourque@irap.omp.eu
|
|
8
|
-
Requires-Python: >=3.10,<3.13
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Requires-Dist: arviz (>=0.17.1,<0.21.0)
|
|
15
|
-
Requires-Dist: astropy (>=6.0.0,<7.0.0)
|
|
16
|
-
Requires-Dist: catppuccin (>=2.3.4,<3.0.0)
|
|
17
|
-
Requires-Dist: chainconsumer (>=1.1.2,<2.0.0)
|
|
18
|
-
Requires-Dist: cmasher (>=1.6.3,<2.0.0)
|
|
19
|
-
Requires-Dist: flax (>=0.10.1,<0.11.0)
|
|
20
|
-
Requires-Dist: interpax (>=0.3.3,<0.4.0)
|
|
21
|
-
Requires-Dist: jax (>=0.5.0,<0.6.0)
|
|
22
|
-
Requires-Dist: jaxns (>=2.6.7,<3.0.0)
|
|
23
|
-
Requires-Dist: jaxopt (>=0.8.1,<0.9.0)
|
|
24
|
-
Requires-Dist: matplotlib (>=3.8.0,<4.0.0)
|
|
25
|
-
Requires-Dist: mendeleev (>=0.15,<0.20)
|
|
26
|
-
Requires-Dist: networkx (>=3.1,<4.0)
|
|
27
|
-
Requires-Dist: numpy (<2.0.0)
|
|
28
|
-
Requires-Dist: numpyro (>=0.16.1,<0.17.0)
|
|
29
|
-
Requires-Dist: optimistix (>=0.0.7,<0.0.11)
|
|
30
|
-
Requires-Dist: pandas (>=2.2.0,<3.0.0)
|
|
31
|
-
Requires-Dist: pooch (>=1.8.2,<2.0.0)
|
|
32
|
-
Requires-Dist: scipy (<1.15)
|
|
33
|
-
Requires-Dist: seaborn (>=0.13.1,<0.14.0)
|
|
34
|
-
Requires-Dist: simpleeval (>=0.9.13,<1.1.0)
|
|
35
|
-
Requires-Dist: sparse (>=0.15.4,<0.16.0)
|
|
36
|
-
Requires-Dist: tinygp (>=0.3.0,<0.4.0)
|
|
37
|
-
Requires-Dist: watermark (>=2.4.3,<3.0.0)
|
|
38
|
-
Project-URL: Documentation, https://jaxspec.readthedocs.io/en/latest/
|
|
39
5
|
Project-URL: Homepage, https://github.com/renecotyfanboy/jaxspec
|
|
6
|
+
Project-URL: Documentation, https://jaxspec.readthedocs.io/en/latest/
|
|
7
|
+
Author-email: sdupourque <sdupourque@irap.omp.eu>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE.md
|
|
10
|
+
Requires-Python: <3.13,>=3.10
|
|
11
|
+
Requires-Dist: arviz<0.21.0,>=0.17.1
|
|
12
|
+
Requires-Dist: astropy<7,>=6.0.0
|
|
13
|
+
Requires-Dist: catppuccin<3,>=2.3.4
|
|
14
|
+
Requires-Dist: chainconsumer<2,>=1.1.2
|
|
15
|
+
Requires-Dist: cmasher<2,>=1.6.3
|
|
16
|
+
Requires-Dist: flax<0.11,>=0.10.3
|
|
17
|
+
Requires-Dist: interpax<0.4,>=0.3.5
|
|
18
|
+
Requires-Dist: jax<0.6,>=0.5.0
|
|
19
|
+
Requires-Dist: jaxns<3,>=2.6.7
|
|
20
|
+
Requires-Dist: jaxopt<0.9,>=0.8.3
|
|
21
|
+
Requires-Dist: matplotlib<4,>=3.8.0
|
|
22
|
+
Requires-Dist: mendeleev<0.20,>=0.15
|
|
23
|
+
Requires-Dist: networkx~=3.1
|
|
24
|
+
Requires-Dist: numpy<2.0.0
|
|
25
|
+
Requires-Dist: numpyro<0.18,>=0.17.0
|
|
26
|
+
Requires-Dist: optimistix<0.0.11,>=0.0.10
|
|
27
|
+
Requires-Dist: pandas<3,>=2.2.0
|
|
28
|
+
Requires-Dist: pooch<2,>=1.8.2
|
|
29
|
+
Requires-Dist: scipy<1.15
|
|
30
|
+
Requires-Dist: seaborn<0.14,>=0.13.1
|
|
31
|
+
Requires-Dist: simpleeval<1.1.0,>=0.9.13
|
|
32
|
+
Requires-Dist: sparse<0.16,>=0.15.4
|
|
33
|
+
Requires-Dist: tinygp<0.4,>=0.3.0
|
|
34
|
+
Requires-Dist: watermark<3,>=2.4.3
|
|
40
35
|
Description-Content-Type: text/markdown
|
|
41
36
|
|
|
42
37
|
<p align="center">
|
|
@@ -97,4 +92,3 @@ If you use `jaxspec` in your research, please consider citing the following arti
|
|
|
97
92
|
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
|
|
98
93
|
}
|
|
99
94
|
```
|
|
100
|
-
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
## Install `jaxspec` repository locally
|
|
2
|
+
|
|
3
|
+
Adding content to the `jaxspec`'s source code requires you to clone the repository locally. This is done by running the
|
|
4
|
+
following command in your terminal:
|
|
5
|
+
|
|
6
|
+
``` bash
|
|
7
|
+
git clone https://github.com/renecotyfanboy/jaxspec
|
|
8
|
+
cd jaxspec
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Set up a clean environment
|
|
12
|
+
|
|
13
|
+
`jaxspec` uses [Poetry](https://python-poetry.org/) to manage its dependencies. We recommand to start from a fresh
|
|
14
|
+
Python environment, and install Poetry. If you use conda, you can create a new environment with
|
|
15
|
+
|
|
16
|
+
``` bash
|
|
17
|
+
conda create -n jaxspec python=3.10
|
|
18
|
+
conda activate jaxspec
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
To install Poetry, run the following in the (`jaxspec`) environment:
|
|
22
|
+
|
|
23
|
+
``` bash
|
|
24
|
+
pip install poetry
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Then, to install `jaxspec`'s dependencies, run the following command in the directory where you cloned the repository:
|
|
28
|
+
|
|
29
|
+
``` bash
|
|
30
|
+
poetry install
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
# Code quality
|
|
34
|
+
|
|
35
|
+
We use [ruff](https://docs.astral.sh/ruff/) to enforce code quality standards, which proposes both a linter and a
|
|
36
|
+
formatter. They are set up with the pre-commit hooks (see below).
|
|
37
|
+
|
|
38
|
+
## Pre-commit hooks
|
|
39
|
+
|
|
40
|
+
We use [pre-commit](https://pre-commit.com/) to run the linter and formatter automatically before each commit.
|
|
41
|
+
All the hooks are defined in `.pre-commit-config.yaml` and can be run manually with
|
|
42
|
+
|
|
43
|
+
``` bash
|
|
44
|
+
poetry run pre-commit run --all-files
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
If you want to install the pre-commit hooks so they run automatically, use
|
|
48
|
+
|
|
49
|
+
``` bash
|
|
50
|
+
poetry run pre-commit install
|
|
51
|
+
```
|