dynestyx 0.0.3__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.
Files changed (146) hide show
  1. dynestyx-0.0.3/.github/workflows/build_docs.yml +87 -0
  2. dynestyx-0.0.3/.github/workflows/lint.yml +39 -0
  3. dynestyx-0.0.3/.github/workflows/python-publish.yml +37 -0
  4. dynestyx-0.0.3/.github/workflows/test.yml +37 -0
  5. dynestyx-0.0.3/.gitignore +184 -0
  6. dynestyx-0.0.3/.python-version +1 -0
  7. dynestyx-0.0.3/CONTRIBUTING.md +123 -0
  8. dynestyx-0.0.3/LICENSE.md +202 -0
  9. dynestyx-0.0.3/PKG-INFO +76 -0
  10. dynestyx-0.0.3/README.md +41 -0
  11. dynestyx-0.0.3/docs/api_reference/developer/diagnostics/plotting_utils.md +19 -0
  12. dynestyx-0.0.3/docs/api_reference/developer/discretizers/discretizer.md +11 -0
  13. dynestyx-0.0.3/docs/api_reference/developer/handlers.md +7 -0
  14. dynestyx-0.0.3/docs/api_reference/developer/index.md +4 -0
  15. dynestyx-0.0.3/docs/api_reference/developer/inference/blackjax_integration.md +8 -0
  16. dynestyx-0.0.3/docs/api_reference/developer/inference/filter_configs.md +8 -0
  17. dynestyx-0.0.3/docs/api_reference/developer/inference/filters.md +8 -0
  18. dynestyx-0.0.3/docs/api_reference/developer/inference/mcmc.md +7 -0
  19. dynestyx-0.0.3/docs/api_reference/developer/inference/mcmc_configs.md +8 -0
  20. dynestyx-0.0.3/docs/api_reference/developer/models/core_models.md +5 -0
  21. dynestyx-0.0.3/docs/api_reference/developer/models/specialized_models.md +20 -0
  22. dynestyx-0.0.3/docs/api_reference/developer/simulators.md +63 -0
  23. dynestyx-0.0.3/docs/api_reference/index.md +8 -0
  24. dynestyx-0.0.3/docs/api_reference/public/diagnostics/plotting_utils.md +18 -0
  25. dynestyx-0.0.3/docs/api_reference/public/discretizers/discretizer.md +16 -0
  26. dynestyx-0.0.3/docs/api_reference/public/handlers.md +15 -0
  27. dynestyx-0.0.3/docs/api_reference/public/index.md +6 -0
  28. dynestyx-0.0.3/docs/api_reference/public/inference/filter_configs.md +44 -0
  29. dynestyx-0.0.3/docs/api_reference/public/inference/filters.md +9 -0
  30. dynestyx-0.0.3/docs/api_reference/public/inference/mcmc.md +10 -0
  31. dynestyx-0.0.3/docs/api_reference/public/inference/mcmc_configs.md +12 -0
  32. dynestyx-0.0.3/docs/api_reference/public/models/core/continuous_time_state_evolution.md +7 -0
  33. dynestyx-0.0.3/docs/api_reference/public/models/core/discrete_time_state_evolution.md +7 -0
  34. dynestyx-0.0.3/docs/api_reference/public/models/core/drift.md +7 -0
  35. dynestyx-0.0.3/docs/api_reference/public/models/core/dynamical_model.md +58 -0
  36. dynestyx-0.0.3/docs/api_reference/public/models/core/observation_model.md +36 -0
  37. dynestyx-0.0.3/docs/api_reference/public/models/core/potential.md +7 -0
  38. dynestyx-0.0.3/docs/api_reference/public/models/core_models.md +12 -0
  39. dynestyx-0.0.3/docs/api_reference/public/models/specialized/affine_drift.md +43 -0
  40. dynestyx-0.0.3/docs/api_reference/public/models/specialized/gaussian_observation.md +38 -0
  41. dynestyx-0.0.3/docs/api_reference/public/models/specialized/gaussian_state_evolution.md +42 -0
  42. dynestyx-0.0.3/docs/api_reference/public/models/specialized/linear_gaussian_observation.md +38 -0
  43. dynestyx-0.0.3/docs/api_reference/public/models/specialized/linear_gaussian_state_evolution.md +38 -0
  44. dynestyx-0.0.3/docs/api_reference/public/models/specialized/lti_continuous.md +42 -0
  45. dynestyx-0.0.3/docs/api_reference/public/models/specialized/lti_discrete.md +42 -0
  46. dynestyx-0.0.3/docs/api_reference/public/models/specialized_models.md +28 -0
  47. dynestyx-0.0.3/docs/api_reference/public/simulators/discrete_time_simulator.md +76 -0
  48. dynestyx-0.0.3/docs/api_reference/public/simulators/ode_simulator.md +73 -0
  49. dynestyx-0.0.3/docs/api_reference/public/simulators/overview.md +61 -0
  50. dynestyx-0.0.3/docs/api_reference/public/simulators/sde_simulator.md +77 -0
  51. dynestyx-0.0.3/docs/api_reference/public/simulators/simulator_wrapper.md +77 -0
  52. dynestyx-0.0.3/docs/deep_dives/discrete_time_lti_profile_likelihood.ipynb +539 -0
  53. dynestyx-0.0.3/docs/deep_dives/fhn_sparse_id.ipynb +784 -0
  54. dynestyx-0.0.3/docs/deep_dives/gp_drift.ipynb +1356 -0
  55. dynestyx-0.0.3/docs/deep_dives/l63_speedup_dirac_vs_enkf.ipynb +401 -0
  56. dynestyx-0.0.3/docs/deep_dives/mcmc_inference_algorithm_comparison.ipynb +517 -0
  57. dynestyx-0.0.3/docs/faq.md +112 -0
  58. dynestyx-0.0.3/docs/index.md +126 -0
  59. dynestyx-0.0.3/docs/javascripts/mathjax.js +23 -0
  60. dynestyx-0.0.3/docs/logo/dynestyx.gif +0 -0
  61. dynestyx-0.0.3/docs/logo/make_logo.py +429 -0
  62. dynestyx-0.0.3/docs/math_intro.md +139 -0
  63. dynestyx-0.0.3/docs/quick_example.ipynb +277 -0
  64. dynestyx-0.0.3/docs/tutorials/gentle_intro/00_index.ipynb +54 -0
  65. dynestyx-0.0.3/docs/tutorials/gentle_intro/01_numpyro_bayesian_workflow.ipynb +449 -0
  66. dynestyx-0.0.3/docs/tutorials/gentle_intro/02_dynestyx_discrete_intro.ipynb +621 -0
  67. dynestyx-0.0.3/docs/tutorials/gentle_intro/03_filtering_mll.ipynb +327 -0
  68. dynestyx-0.0.3/docs/tutorials/gentle_intro/04_filtering_nuts_pseudomarginal.ipynb +506 -0
  69. dynestyx-0.0.3/docs/tutorials/gentle_intro/05_svi.ipynb +424 -0
  70. dynestyx-0.0.3/docs/tutorials/gentle_intro/06_continuous_time.ipynb +515 -0
  71. dynestyx-0.0.3/docs/tutorials/gentle_intro/06b_odes.ipynb +691 -0
  72. dynestyx-0.0.3/docs/tutorials/gentle_intro/07_hmm.ipynb +415 -0
  73. dynestyx-0.0.3/docs/tutorials/quickstart.ipynb +386 -0
  74. dynestyx-0.0.3/docs/tutorials/sde_non_gaussian_observations.ipynb +451 -0
  75. dynestyx-0.0.3/docs/tutorials.md +17 -0
  76. dynestyx-0.0.3/dynestyx/__init__.py +49 -0
  77. dynestyx-0.0.3/dynestyx/diagnostics/__init__.py +1 -0
  78. dynestyx-0.0.3/dynestyx/diagnostics/plotting_utils.py +434 -0
  79. dynestyx-0.0.3/dynestyx/discretizers.py +206 -0
  80. dynestyx-0.0.3/dynestyx/handlers.py +155 -0
  81. dynestyx-0.0.3/dynestyx/inference/__init__.py +7 -0
  82. dynestyx-0.0.3/dynestyx/inference/filter_configs.py +675 -0
  83. dynestyx-0.0.3/dynestyx/inference/filters.py +352 -0
  84. dynestyx-0.0.3/dynestyx/inference/hmm_filters.py +241 -0
  85. dynestyx-0.0.3/dynestyx/inference/integrations/__init__.py +3 -0
  86. dynestyx-0.0.3/dynestyx/inference/integrations/blackjax/__init__.py +5 -0
  87. dynestyx-0.0.3/dynestyx/inference/integrations/blackjax/mcmc.py +319 -0
  88. dynestyx-0.0.3/dynestyx/inference/integrations/cd_dynamax/__init__.py +1 -0
  89. dynestyx-0.0.3/dynestyx/inference/integrations/cd_dynamax/continuous.py +266 -0
  90. dynestyx-0.0.3/dynestyx/inference/integrations/cd_dynamax/discrete.py +316 -0
  91. dynestyx-0.0.3/dynestyx/inference/integrations/cd_dynamax/utils.py +440 -0
  92. dynestyx-0.0.3/dynestyx/inference/integrations/cuthbert/__init__.py +1 -0
  93. dynestyx-0.0.3/dynestyx/inference/integrations/cuthbert/discrete.py +458 -0
  94. dynestyx-0.0.3/dynestyx/inference/integrations/utils.py +83 -0
  95. dynestyx-0.0.3/dynestyx/inference/mcmc.py +158 -0
  96. dynestyx-0.0.3/dynestyx/inference/mcmc_configs.py +113 -0
  97. dynestyx-0.0.3/dynestyx/models/__init__.py +39 -0
  98. dynestyx-0.0.3/dynestyx/models/checkers.py +163 -0
  99. dynestyx-0.0.3/dynestyx/models/core.py +376 -0
  100. dynestyx-0.0.3/dynestyx/models/lti_dynamics.py +189 -0
  101. dynestyx-0.0.3/dynestyx/models/observations.py +112 -0
  102. dynestyx-0.0.3/dynestyx/models/state_evolution.py +147 -0
  103. dynestyx-0.0.3/dynestyx/simulators.py +1044 -0
  104. dynestyx-0.0.3/dynestyx/types.py +14 -0
  105. dynestyx-0.0.3/dynestyx/utils.py +223 -0
  106. dynestyx-0.0.3/mkdocs.yml +478 -0
  107. dynestyx-0.0.3/pyproject.toml +83 -0
  108. dynestyx-0.0.3/scripts/clean.sh +6 -0
  109. dynestyx-0.0.3/scripts/done.sh +5 -0
  110. dynestyx-0.0.3/scripts/lint.sh +8 -0
  111. dynestyx-0.0.3/scripts/test.sh +15 -0
  112. dynestyx-0.0.3/scripts/test_full.sh +15 -0
  113. dynestyx-0.0.3/tests/__init__.py +1 -0
  114. dynestyx-0.0.3/tests/fixtures.py +1392 -0
  115. dynestyx-0.0.3/tests/models.py +595 -0
  116. dynestyx-0.0.3/tests/test_blackjax_no_crn.py +360 -0
  117. dynestyx-0.0.3/tests/test_filter_simulator.py +241 -0
  118. dynestyx-0.0.3/tests/test_filters.py +96 -0
  119. dynestyx-0.0.3/tests/test_inference_integrations_utils.py +12 -0
  120. dynestyx-0.0.3/tests/test_mcmc_filter_smokes.py +144 -0
  121. dynestyx-0.0.3/tests/test_mcmc_filter_smokes_discrete.py +66 -0
  122. dynestyx-0.0.3/tests/test_mcmc_smokes.py +216 -0
  123. dynestyx-0.0.3/tests/test_mcmc_smokes_discrete.py +98 -0
  124. dynestyx-0.0.3/tests/test_models_core.py +441 -0
  125. dynestyx-0.0.3/tests/test_predictive_filter_simulator_shapes.py +329 -0
  126. dynestyx-0.0.3/tests/test_sample_input_matrix.py +306 -0
  127. dynestyx-0.0.3/tests/test_science/__init__.py +0 -0
  128. dynestyx-0.0.3/tests/test_science/test_discreteTime_generic.py +79 -0
  129. dynestyx-0.0.3/tests/test_science/test_discreteTime_generic_auto.py +81 -0
  130. dynestyx-0.0.3/tests/test_science/test_discrete_time_l63_mcmc.py +79 -0
  131. dynestyx-0.0.3/tests/test_science/test_discrete_time_l63_svi_pf.py +89 -0
  132. dynestyx-0.0.3/tests/test_science/test_hmm.py +63 -0
  133. dynestyx-0.0.3/tests/test_science/test_l63_ODE_mcmc.py +82 -0
  134. dynestyx-0.0.3/tests/test_science/test_l63_ODE_sgmcmc.py +51 -0
  135. dynestyx-0.0.3/tests/test_science/test_l63_SDE_mcmc.py +82 -0
  136. dynestyx-0.0.3/tests/test_science/test_l63_SDE_sgmcmc.py +51 -0
  137. dynestyx-0.0.3/tests/test_science/test_l63_mcmc_dpf.py +84 -0
  138. dynestyx-0.0.3/tests/test_science/test_lti_continuous_simplified.py +105 -0
  139. dynestyx-0.0.3/tests/test_science/test_lti_discrete_simplified.py +105 -0
  140. dynestyx-0.0.3/tests/test_science/test_lti_discrete_simplified_sgmcmc.py +49 -0
  141. dynestyx-0.0.3/tests/test_science/test_lti_gaussian.py +84 -0
  142. dynestyx-0.0.3/tests/test_science/test_lti_gaussian_dpf.py +81 -0
  143. dynestyx-0.0.3/tests/test_science/test_profile_likelihood.py +165 -0
  144. dynestyx-0.0.3/tests/test_science/test_stochastic_volatility_mcmc.py +72 -0
  145. dynestyx-0.0.3/tests/test_sgmcmc_inference_smoke.py +85 -0
  146. dynestyx-0.0.3/tests/test_utils.py +135 -0
@@ -0,0 +1,87 @@
1
+ name: Build docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ tags: ["v*"]
7
+ workflow_dispatch:
8
+ inputs:
9
+ target_ref:
10
+ description: Git ref to build from (e.g. main, v0.0.1, feature/my-docs)
11
+ required: true
12
+ default: main
13
+ version:
14
+ description: Mike version id to publish (e.g. 0.0.1, dev, manual-preview-build)
15
+ required: true
16
+ default: manual-preview-build
17
+ alias:
18
+ description: Mike alias to update (e.g. stable, latest, manual-preview)
19
+ required: true
20
+ default: manual-preview
21
+ title:
22
+ description: Human-readable title in version switcher
23
+ required: true
24
+ default: manual preview
25
+ set_default:
26
+ description: Also set this alias as the default site root
27
+ required: true
28
+ default: "false"
29
+
30
+ permissions:
31
+ contents: write
32
+
33
+ concurrency:
34
+ group: ${{ github.event_name == 'workflow_dispatch' && format('docs-manual-{0}', inputs.version) || github.ref }}
35
+ cancel-in-progress: true
36
+
37
+ jobs:
38
+ build:
39
+ runs-on: ubuntu-latest
40
+
41
+ steps:
42
+ - uses: actions/checkout@v4
43
+ with:
44
+ fetch-depth: 0
45
+ ref: ${{ github.event_name == 'workflow_dispatch' && inputs.target_ref || github.ref }}
46
+
47
+ - name: Setup Python
48
+ uses: actions/setup-python@v5
49
+
50
+ - name: Install uv
51
+ uses: astral-sh/setup-uv@v5
52
+ with:
53
+ version: "0.6.3"
54
+ enable-cache: true
55
+
56
+ - name: Install dependencies
57
+ run: uv sync --all-extras --dev
58
+
59
+ - name: Configure Git for mike
60
+ run: |
61
+ git config user.name "github-actions[bot]"
62
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
63
+
64
+ - name: Build latest docs
65
+ if: github.ref == 'refs/heads/main' && github.event_name == 'push'
66
+ run: |
67
+ uv run mike deploy --push --title "latest" dev latest
68
+
69
+ - name: Build stable docs
70
+ if: startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push'
71
+ env:
72
+ TAG: ${{ github.ref_name }}
73
+ run: |
74
+ VERSION="${TAG#v}"
75
+ uv run mike deploy --push --update-aliases --title "$VERSION" "$VERSION" stable
76
+ uv run mike set-default --push stable
77
+
78
+ - name: Build manual docs
79
+ if: github.event_name == 'workflow_dispatch'
80
+ run: |
81
+ uv run mike deploy --push \
82
+ --title "${{ inputs.title }}" \
83
+ "${{ inputs.version }}" \
84
+ "${{ inputs.alias }}"
85
+ if [ "${{ inputs.set_default }}" = "true" ]; then
86
+ uv run mike set-default --push "${{ inputs.alias }}"
87
+ fi
@@ -0,0 +1,39 @@
1
+ name: Lint
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches:
8
+ - main
9
+ - "staging-*"
10
+ - "*"
11
+ workflow_dispatch:
12
+
13
+ jobs:
14
+ build:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Setup Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version-file: "pyproject.toml"
23
+
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@v5
26
+ with:
27
+ version: "0.6.3"
28
+ enable-cache: true
29
+
30
+ - name: Install dependencies
31
+ run: |
32
+ uv sync --all-extras --dev
33
+
34
+ - name: Lint
35
+ run: uv run ./scripts/lint.sh
36
+
37
+ - name: Build docs
38
+ run: |
39
+ source .venv/bin/activate && mkdocs build
@@ -0,0 +1,37 @@
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Upload Python Package
10
+
11
+ on:
12
+ release:
13
+ types: [published]
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ deploy:
20
+ runs-on: ubuntu-latest
21
+ environment: pypi
22
+ permissions:
23
+ id-token: write # IMPORTANT: mandatory for trusted publishing
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - name: Set up Python
27
+ uses: actions/setup-python@v5
28
+ with:
29
+ python-version-file: "pyproject.toml"
30
+ - name: Install dependencies
31
+ run: |
32
+ python -m pip install --upgrade pip
33
+ pip install build
34
+ - name: Build package
35
+ run: python -m build
36
+ - name: Publish package
37
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,37 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches:
8
+ - main
9
+ - 'staging-*'
10
+ - '*'
11
+ workflow_dispatch:
12
+
13
+ jobs:
14
+ build:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Setup Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version-file: "pyproject.toml"
23
+
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@v5
26
+ with:
27
+ version: "0.6.3"
28
+ enable-cache: true
29
+
30
+ - name: Install Python dependencies
31
+ run: |
32
+ uv sync --all-extras --dev
33
+
34
+ - name: Run tests
35
+ env:
36
+ MKL_NUM_THREADS: 1
37
+ run: uv run ./scripts/test.sh
@@ -0,0 +1,184 @@
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
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
159
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160
+ #.idea/
161
+
162
+ __pycache__/
163
+ docs/_build/
164
+ build/
165
+ dist/
166
+
167
+ *egg-info
168
+ *.ipynb_checkpoints
169
+
170
+ # ignore figures unless manually added
171
+ *.png
172
+ *.jpg
173
+ *.pdf
174
+ *-dot
175
+ *.DS_Store
176
+ .vscode/
177
+ .venv
178
+
179
+ # Test output directories
180
+ .output/
181
+
182
+ *.ttf
183
+
184
+ uv.lock
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,123 @@
1
+ # Contributing to dynestyx
2
+
3
+ Thanks for contributing. This guide explains the two main ways to contribute: (a) open an issue describing a bug/idea, and/or (b) open a PR with a proposed fix or implementation. We strongly encourage the combined path (A+B): open an issue, then address it yourself and submit a PR.
4
+
5
+ ## 0) Pick a contribution path
6
+
7
+ Preferred path: **A + B** (open an issue, then open a PR that addresses it).
8
+
9
+ ### Option A: Open an issue
10
+
11
+ Use this when you want feedback before coding, or to report a bug/request.
12
+
13
+ 1. Go to the [dynestyx Issues page](https://github.com/BasisResearch/dynestyx/issues).
14
+ 2. Click **New issue**.
15
+ 3. Use a clear title.
16
+ 4. Include:
17
+ - expected behavior
18
+ - observed behavior
19
+ - minimal reproduction (if bug)
20
+ - environment details (OS, Python, key package versions)
21
+ 5. Submit the issue.
22
+
23
+ ### Option B: Open a Pull Request
24
+
25
+ Use this when you already have a concrete proposed change. Follow the steps below.
26
+
27
+ ## 1) Setup
28
+
29
+ Fork `dynestyx` to your GitHub account first:
30
+
31
+ 1. Go to [github.com/BasisResearch/dynestyx](https://github.com/BasisResearch/dynestyx).
32
+ 2. Click **Fork** (top-right).
33
+ 3. Choose your GitHub account as the destination.
34
+
35
+ Then in your terminal, clone your fork and add the original repo as `upstream`:
36
+
37
+ ```bash
38
+ git clone https://github.com/<your-username>/dynestyx.git
39
+ cd dynestyx
40
+ git remote add upstream https://github.com/BasisResearch/dynestyx.git
41
+ git remote -v
42
+ uv venv
43
+ source .venv/bin/activate
44
+ uv sync --dev --all-extras
45
+ ```
46
+
47
+ You should see:
48
+ - `origin` -> `https://github.com/<your-username>/dynestyx.git`
49
+ - `upstream` -> `https://github.com/BasisResearch/dynestyx.git`
50
+
51
+ ## 2) Create a branch
52
+
53
+ ```bash
54
+ git checkout main
55
+ git pull upstream main
56
+ git checkout -b <type>/<short-description>
57
+ ```
58
+
59
+ Examples: `feature/add-ode-example`, `fix/filter-shape-bug`, `docs/update-quickstart`.
60
+
61
+ ## 3) Before opening a PR, run project scripts
62
+
63
+ From repo root:
64
+
65
+ ```bash
66
+ uv run scripts/clean.sh
67
+ uv run scripts/lint.sh
68
+ uv run scripts/test.sh
69
+ ```
70
+
71
+ If you changed a lot or touched core inference code, also run:
72
+
73
+ ```bash
74
+ uv run scripts/test_full.sh
75
+ ```
76
+
77
+ `scripts/test_full.sh` writes run artifacts and logs under `.output`. To inspect results:
78
+
79
+ ```bash
80
+ ls .output
81
+ ```
82
+
83
+ Open relevant files in `.output` to review test summaries/logs for failures.
84
+
85
+ If you edited docs, also build docs locally:
86
+
87
+ ```bash
88
+ uv run mkdocs build
89
+ ```
90
+
91
+ To preview docs locally while editing:
92
+
93
+ ```bash
94
+ uv run mkdocs serve
95
+ ```
96
+
97
+ Then open `http://127.0.0.1:8000` in your browser.
98
+
99
+ Published docs on GitHub Pages are **versioned with [mike](https://github.com/jimporter/mike)** (`latest` = `main`, `stable` = newest `v*` tag). Maintainers deploy via CI; see [docs/versioning.md](docs/versioning.md). When you change tutorials (notebooks), remember readers on **stable** may still use an older install—add an optional banner (template in that page). For versioned local previews (`stable` vs `latest`) and manual backfills from historical tags, use the commands in [docs/versioning.md](docs/versioning.md).
100
+
101
+ ## 4) Commit and push
102
+
103
+ ```bash
104
+ git add .
105
+ git commit -m "Short imperative message"
106
+ git push -u origin <type>/<short-description>
107
+ ```
108
+
109
+ ## 5) Open the Pull Request
110
+
111
+ 1. Go to [github.com/BasisResearch/dynestyx](https://github.com/BasisResearch/dynestyx).
112
+ 2. If prompted with your recently pushed branch, click **Compare & pull request**.
113
+ - If not prompted, go to the **Pull requests** tab and click **New pull request**.
114
+ 3. Set **base** to `BasisResearch/dynestyx:main`.
115
+ 4. Set **compare** to your branch (`<type>/<short-description>`).
116
+ 5. Add title + description (template below), then click **Create pull request**.
117
+
118
+ Use this PR description format:
119
+
120
+ - **Summary**: what changed and why
121
+ - **Notes**: any caveats, follow-ups, or breaking behavior
122
+
123
+ Keep PRs focused. If your change is user-facing, include doc updates in the same PR.