seroepi 0.0.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.
Files changed (91) hide show
  1. seroepi-0.0.1/.github/workflows/docs.yaml +62 -0
  2. seroepi-0.0.1/.github/workflows/release.yml +88 -0
  3. seroepi-0.0.1/.gitignore +220 -0
  4. seroepi-0.0.1/.pre-commit-config.yaml +39 -0
  5. seroepi-0.0.1/CHANGELOG.md +23 -0
  6. seroepi-0.0.1/CITATION.cff +37 -0
  7. seroepi-0.0.1/CODE_OF_CONDUCT.md +128 -0
  8. seroepi-0.0.1/CONTRIBUTING.md +70 -0
  9. seroepi-0.0.1/LICENSE +674 -0
  10. seroepi-0.0.1/PKG-INFO +843 -0
  11. seroepi-0.0.1/README.md +112 -0
  12. seroepi-0.0.1/docs/adr/001-strict-variable-identity-and-lookup.md +52 -0
  13. seroepi-0.0.1/docs/adr/002-aggregator-transformer-and-pipeline-contract.md +68 -0
  14. seroepi-0.0.1/docs/adr/003-unified-stratified-result-mixin.md +56 -0
  15. seroepi-0.0.1/docs/app.md +77 -0
  16. seroepi-0.0.1/docs/assets/favicon.svg +11 -0
  17. seroepi-0.0.1/docs/conduct.md +13 -0
  18. seroepi-0.0.1/docs/contributing.md +13 -0
  19. seroepi-0.0.1/docs/glossary.md +51 -0
  20. seroepi-0.0.1/docs/index.md +109 -0
  21. seroepi-0.0.1/docs/javascripts/mathjax.js +24 -0
  22. seroepi-0.0.1/docs/overrides/404.html +115 -0
  23. seroepi-0.0.1/docs/overrides/main.html +210 -0
  24. seroepi-0.0.1/docs/overrides/partials/comments.html +59 -0
  25. seroepi-0.0.1/docs/reference/dataset.md +77 -0
  26. seroepi-0.0.1/docs/reference/estimators.md +59 -0
  27. seroepi-0.0.1/docs/reference/index.md +19 -0
  28. seroepi-0.0.1/docs/reference/plotting.md +105 -0
  29. seroepi-0.0.1/docs/releases.md +14 -0
  30. seroepi-0.0.1/docs/stylesheets/extra.css +734 -0
  31. seroepi-0.0.1/pyproject.toml +201 -0
  32. seroepi-0.0.1/requirements.txt +20 -0
  33. seroepi-0.0.1/scripts/fetch_announcement.py +98 -0
  34. seroepi-0.0.1/src/seroepi/__init__.py +0 -0
  35. seroepi-0.0.1/src/seroepi/_version.py +24 -0
  36. seroepi-0.0.1/src/seroepi/aggregate.py +436 -0
  37. seroepi-0.0.1/src/seroepi/app/__init__.py +0 -0
  38. seroepi-0.0.1/src/seroepi/app/app.py +271 -0
  39. seroepi-0.0.1/src/seroepi/app/caching.py +181 -0
  40. seroepi-0.0.1/src/seroepi/app/components.py +61 -0
  41. seroepi-0.0.1/src/seroepi/app/dataset/__init__.py +1 -0
  42. seroepi-0.0.1/src/seroepi/app/dataset/composer.py +537 -0
  43. seroepi-0.0.1/src/seroepi/app/dataset/enrich.py +303 -0
  44. seroepi-0.0.1/src/seroepi/app/dataset/explorer.py +107 -0
  45. seroepi-0.0.1/src/seroepi/app/dataset/filters.py +434 -0
  46. seroepi-0.0.1/src/seroepi/app/dataset/loader.py +554 -0
  47. seroepi-0.0.1/src/seroepi/app/dataset/merger.py +645 -0
  48. seroepi-0.0.1/src/seroepi/app/dataset/tab.py +185 -0
  49. seroepi-0.0.1/src/seroepi/app/decorators.py +66 -0
  50. seroepi-0.0.1/src/seroepi/app/estimation.py +799 -0
  51. seroepi-0.0.1/src/seroepi/app/footer.py +552 -0
  52. seroepi-0.0.1/src/seroepi/app/formulation.py +1033 -0
  53. seroepi-0.0.1/src/seroepi/app/home.py +744 -0
  54. seroepi-0.0.1/src/seroepi/app/models.py +278 -0
  55. seroepi-0.0.1/src/seroepi/app/widgets.py +230 -0
  56. seroepi-0.0.1/src/seroepi/client/__init__.py +1 -0
  57. seroepi-0.0.1/src/seroepi/client/base.py +318 -0
  58. seroepi-0.0.1/src/seroepi/client/pathogenwatch.py +977 -0
  59. seroepi-0.0.1/src/seroepi/client/settings.py +119 -0
  60. seroepi-0.0.1/src/seroepi/client/world_bank.py +192 -0
  61. seroepi-0.0.1/src/seroepi/country.py +869 -0
  62. seroepi-0.0.1/src/seroepi/dataset.py +744 -0
  63. seroepi-0.0.1/src/seroepi/dist.py +355 -0
  64. seroepi-0.0.1/src/seroepi/estimators/__init__.py +1 -0
  65. seroepi-0.0.1/src/seroepi/estimators/base.py +850 -0
  66. seroepi-0.0.1/src/seroepi/estimators/formulation.py +1312 -0
  67. seroepi-0.0.1/src/seroepi/estimators/hierarchical.py +775 -0
  68. seroepi-0.0.1/src/seroepi/estimators/intervals.py +337 -0
  69. seroepi-0.0.1/src/seroepi/estimators/transmission.py +1391 -0
  70. seroepi-0.0.1/src/seroepi/estimators/unpooled.py +365 -0
  71. seroepi-0.0.1/src/seroepi/examples.py +157 -0
  72. seroepi-0.0.1/src/seroepi/io/__init__.py +1 -0
  73. seroepi-0.0.1/src/seroepi/io/base.py +105 -0
  74. seroepi-0.0.1/src/seroepi/io/dataset/__init__.py +1 -0
  75. seroepi-0.0.1/src/seroepi/io/dataset/base.py +465 -0
  76. seroepi-0.0.1/src/seroepi/io/dataset/kleborate.py +255 -0
  77. seroepi-0.0.1/src/seroepi/io/dist.py +463 -0
  78. seroepi-0.0.1/src/seroepi/models.py +644 -0
  79. seroepi-0.0.1/src/seroepi/plotting/__init__.py +1 -0
  80. seroepi-0.0.1/src/seroepi/plotting/bar.py +214 -0
  81. seroepi-0.0.1/src/seroepi/plotting/base.py +748 -0
  82. seroepi-0.0.1/src/seroepi/plotting/choropleth.py +528 -0
  83. seroepi-0.0.1/src/seroepi/plotting/formulation.py +1435 -0
  84. seroepi-0.0.1/src/seroepi/plotting/heatmap.py +258 -0
  85. seroepi-0.0.1/src/seroepi/plotting/pyramid.py +357 -0
  86. seroepi-0.0.1/src/seroepi/plotting/upset.py +1115 -0
  87. seroepi-0.0.1/src/seroepi/py.typed +0 -0
  88. seroepi-0.0.1/src/seroepi/variables.py +1775 -0
  89. seroepi-0.0.1/tests/conftest.py +95 -0
  90. seroepi-0.0.1/uv.lock +3071 -0
  91. seroepi-0.0.1/zensical.toml +213 -0
@@ -0,0 +1,62 @@
1
+ name: Deploy Documentation
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+ pages: write
12
+ id-token: write
13
+
14
+ concurrency:
15
+ group: "pages"
16
+ cancel-in-progress: false
17
+
18
+ jobs:
19
+ # -----------------------------------------------------
20
+ # JOB 1: Build Zensical documentation artifact
21
+ # -----------------------------------------------------
22
+ build:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - name: Checkout repository
26
+ uses: actions/checkout@v5
27
+
28
+ - name: Install uv
29
+ uses: astral-sh/setup-uv@v5
30
+ with:
31
+ enable-cache: true
32
+ python-version: "3.14"
33
+
34
+ - name: Install project and dependencies
35
+ run: uv sync --no-sources --all-groups --all-extras
36
+
37
+ - name: Fetch latest announcement from SeroVerse/.github
38
+ env:
39
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40
+ run: uv run --no-sources --group docs python scripts/fetch_announcement.py
41
+
42
+ - name: Build documentation
43
+ run: uv run --no-sources --group docs zensical build --clean
44
+
45
+ - name: Upload GitHub Pages artifact
46
+ uses: actions/upload-pages-artifact@v4
47
+ with:
48
+ path: site/
49
+
50
+ # -----------------------------------------------------
51
+ # JOB 2: Deploy the uploaded artifact to GitHub Pages
52
+ # -----------------------------------------------------
53
+ deploy:
54
+ needs: build
55
+ runs-on: ubuntu-latest
56
+ environment:
57
+ name: github-pages
58
+ url: ${{ steps.deployment.outputs.page_url }}
59
+ steps:
60
+ - name: Deploy to GitHub Pages
61
+ id: deployment
62
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,88 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+ inputs:
9
+ dry_run:
10
+ description: "Build & verify distributions without publishing to PyPI"
11
+ required: false
12
+ default: true
13
+ type: boolean
14
+
15
+ permissions:
16
+ contents: write
17
+ id-token: write
18
+
19
+ jobs:
20
+ build:
21
+ name: Build Distribution Artifacts
22
+ runs-on: ubuntu-latest
23
+ timeout-minutes: 10
24
+ steps:
25
+ - name: Checkout repository with full history for hatch-vcs
26
+ uses: actions/checkout@v4
27
+ with:
28
+ fetch-depth: 0
29
+
30
+ - name: Set up uv
31
+ uses: astral-sh/setup-uv@v5
32
+ with:
33
+ version: "latest"
34
+ python-version: "3.14"
35
+ enable-cache: true
36
+ cache-dependency-glob: "uv.lock"
37
+
38
+ - name: Build wheel and sdist
39
+ run: uv build
40
+
41
+ - name: Smoke-test built wheel in isolated environment
42
+ run: |
43
+ uv run --isolated --no-project --with dist/*.whl python -c "
44
+ import seroepi
45
+ "
46
+
47
+ - name: Upload distribution artifacts
48
+ uses: actions/upload-artifact@v4
49
+ with:
50
+ name: dist
51
+ path: dist/
52
+ retention-days: 7
53
+
54
+ publish-pypi:
55
+ name: Publish to PyPI (Trusted Publishing)
56
+ if: startsWith(github.ref, 'refs/tags/v') && github.event.inputs.dry_run != 'true'
57
+ needs: build
58
+ runs-on: ubuntu-latest
59
+ environment:
60
+ name: pypi
61
+ url: https://pypi.org/p/seroepi
62
+ steps:
63
+ - name: Download distribution artifacts
64
+ uses: actions/download-artifact@v4
65
+ with:
66
+ name: dist
67
+ path: dist/
68
+
69
+ - name: Publish package distributions to PyPI
70
+ uses: pypa/gh-action-pypi-publish@release/v1
71
+
72
+ github-release:
73
+ name: Create GitHub Release
74
+ if: startsWith(github.ref, 'refs/tags/v') && github.event.inputs.dry_run != 'true'
75
+ needs: [build, publish-pypi]
76
+ runs-on: ubuntu-latest
77
+ steps:
78
+ - name: Download distribution artifacts
79
+ uses: actions/download-artifact@v4
80
+ with:
81
+ name: dist
82
+ path: dist/
83
+
84
+ - name: Create GitHub Release
85
+ uses: softprops/action-gh-release@v2
86
+ with:
87
+ files: dist/*
88
+ generate_release_notes: true
@@ -0,0 +1,220 @@
1
+ docs/source
2
+
3
+ # From https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore
4
+
5
+ # Byte-compiled / optimized / DLL files
6
+ __pycache__/
7
+ *.py[codz]
8
+ *$py.class
9
+
10
+ # C extensions
11
+ *.so
12
+
13
+ # Distribution / packaging
14
+ .Python
15
+ build/
16
+ develop-eggs/
17
+ dist/
18
+ downloads/
19
+ eggs/
20
+ .eggs/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ wheels/
27
+ share/python-wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+ MANIFEST
32
+
33
+ # PyInstaller
34
+ # Usually these files are written by a python script from a template
35
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36
+ *.manifest
37
+ *.spec
38
+
39
+ # Installer logs
40
+ pip-log.txt
41
+ pip-delete-this-directory.txt
42
+
43
+ # Unit test / coverage reports
44
+ htmlcov/
45
+ .tox/
46
+ .nox/
47
+ .coverage
48
+ .coverage.*
49
+ .cache
50
+ nosetests.xml
51
+ coverage.xml
52
+ *.cover
53
+ *.py.cover
54
+ .hypothesis/
55
+ .pytest_cache/
56
+ .testmondata*
57
+ cover/
58
+ .karva/
59
+ .karva_cache/
60
+
61
+ # Translations
62
+ *.mo
63
+ *.pot
64
+
65
+ # Django stuff:
66
+ *.log
67
+ local_settings.py
68
+ db.sqlite3
69
+ db.sqlite3-journal
70
+
71
+ # Flask stuff:
72
+ instance/
73
+ .webassets-cache
74
+
75
+ # Scrapy stuff:
76
+ .scrapy
77
+
78
+ # Sphinx documentation
79
+ docs/_build/
80
+
81
+ # PyBuilder
82
+ .pybuilder/
83
+ target/
84
+
85
+ # Jupyter Notebook
86
+ .ipynb_checkpoints
87
+
88
+ # IPython
89
+ profile_default/
90
+ ipython_config.py
91
+
92
+ # pyenv
93
+ # For a library or package, you might want to ignore these files since the code is
94
+ # intended to run in multiple environments; otherwise, check them in:
95
+ .python-version
96
+
97
+ # pipenv
98
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
99
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
100
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
101
+ # install all needed dependencies.
102
+ #Pipfile.lock
103
+
104
+ # UV
105
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ #uv.lock
109
+
110
+ # poetry
111
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
112
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
113
+ # commonly ignored for libraries.
114
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
115
+ #poetry.lock
116
+ #poetry.toml
117
+
118
+ # pdm
119
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
120
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
121
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
122
+ #pdm.lock
123
+ #pdm.toml
124
+ .pdm-python
125
+ .pdm-build/
126
+
127
+ # pixi
128
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
129
+ #pixi.lock
130
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
131
+ # in the .venv directory. It is recommended not to include this directory in version control.
132
+ .pixi
133
+
134
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
135
+ __pypackages__/
136
+
137
+ # Celery stuff
138
+ celerybeat-schedule
139
+ celerybeat.pid
140
+
141
+ # SageMath parsed files
142
+ *.sage.py
143
+
144
+ # Environments
145
+ .env
146
+ .envrc
147
+ .venv
148
+ env/
149
+ venv/
150
+ ENV/
151
+ env.bak/
152
+ venv.bak/
153
+
154
+ # Spyder project settings
155
+ .spyderproject
156
+ .spyproject
157
+
158
+ # Rope project settings
159
+ .ropeproject
160
+
161
+ # mkdocs / zensical documentation
162
+ /site
163
+ docs/overrides/announcement.html
164
+
165
+ # mypy
166
+ .mypy_cache/
167
+ .dmypy.json
168
+ dmypy.json
169
+
170
+ # Pyre type checker
171
+ .pyre/
172
+
173
+ # pytype static type analyzer
174
+ .pytype/
175
+
176
+ # Cython debug symbols
177
+ cython_debug/
178
+
179
+ # PyCharm
180
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
181
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
182
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
183
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
184
+ .idea/
185
+
186
+ # Abstra
187
+ # Abstra is an AI-powered process automation framework.
188
+ # Ignore directories containing user credentials, local state, and settings.
189
+ # Learn more at https://abstra.io/docs
190
+ .abstra/
191
+
192
+ # Visual Studio Code
193
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
194
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
195
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
196
+ # you could uncomment the following to ignore the entire vscode folder
197
+ # .vscode/
198
+
199
+ # Ruff stuff:
200
+ .ruff_cache/
201
+
202
+ # PyPI configuration file
203
+ .pypirc
204
+
205
+ # Cursor
206
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
207
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
208
+ # refer to https://docs.cursor.com/context/ignore-files
209
+ .cursorignore
210
+ .cursorindexingignore
211
+
212
+ # Marimo
213
+ marimo/_static/
214
+ marimo/_lsp/
215
+ __marimo__/
216
+
217
+ # MacOS
218
+ *.DS
219
+
220
+ src/seroepi/app/old__for_ref_only
@@ -0,0 +1,39 @@
1
+ repos:
2
+ - repo: local
3
+ hooks:
4
+ - id: ruff-format
5
+ name: ruff format
6
+ entry: uv run --group lint ruff format
7
+ language: system
8
+ types: [python]
9
+ require_serial: true
10
+ - id: ruff-check
11
+ name: ruff check
12
+ entry: uv run --group lint ruff check --fix
13
+ language: system
14
+ types: [python]
15
+ require_serial: true
16
+ - id: ty-check
17
+ name: ty check
18
+ entry: uv run --group typing ty check src
19
+ language: system
20
+ types: [python]
21
+ pass_filenames: false
22
+ - id: zenzic-guard
23
+ name: zenzic guard
24
+ entry: uv run --group docs zenzic guard scan
25
+ language: system
26
+ pass_filenames: false
27
+ files: \.(md|mdx|toml)$
28
+ - id: zenzic-check
29
+ name: zenzic check
30
+ entry: uv run --group docs zenzic check all --quiet
31
+ language: system
32
+ pass_filenames: false
33
+ files: \.(md|toml)$
34
+ - id: pytest-test
35
+ name: pytest test
36
+ entry: uv run --group test pytest --testmon
37
+ language: system
38
+ types: [python]
39
+ pass_filenames: false
@@ -0,0 +1,23 @@
1
+ # Release Notes
2
+
3
+ All notable changes to **`SeroEpi`** are documented on this page. This project adheres to [Semantic Versioning](https://semver.org/) and the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) specification.
4
+
5
+ ---
6
+
7
+ ## [Unreleased]
8
+
9
+ ### Added
10
+
11
+ - **Surveillance Cohort & Semantic Variable Engine (`seroepi.dataset`, `seroepi.variables`, `seroepi.dist`)**:
12
+ - Immutable Polars-backed `Dataset` container with $O(1)$ identity-mapped `Variable` lookup (`Trait`, `Spatial`, `Temporal`, `Target`, and composable multi-variable `Criterion` expressions).
13
+ - Sparse CSR pairwise SNP distance matrices (`GenomicDistances`) and outbreak-aware clonal cluster deduplication (`TransmissionEstimator`).
14
+ - Asynchronous `PathogenwatchClient` and UN/World Bank demographic `WorldBankClient` with bundled `KlebnetNeonatalSepsis` and `CountryData` assets.
15
+ - **Stratified Aggregation & Bayesian Prevalence Estimators (`seroepi.aggregate`, `seroepi.estimators`)**:
16
+ - `Aggregator` sufficiency-reduction transformer compatible with `scikit-learn` pipelines.
17
+ - Analytical/frequentist `UnpooledEstimator` (Wilson, Clopper-Pearson, Jeffreys, Dirichlet) and `BootstrapEstimator`.
18
+ - `JAX`/`NumPyro` hierarchical Bayesian partial-pooling models (`HierarchicalMCMCEstimator` NUTS and `HierarchicalSVIEstimator` SVI) for Binomial and Beta-Binomial / Dirichlet-Multinomial likelihoods.
19
+ - **Multi-Valent Formulation Optimization (`seroepi.estimators.formulation`)**:
20
+ - `Formulation` and `FormulationComparison` meta-estimators supporting pooled or equal-stratum weights, Leave-One-Stratum-Out (`LOSO`) cross-validation, and permutation/Bayesian False Discovery Rate (`BH`/`BY`) differential enrichment testing.
21
+ - **Publication-Grade Altair Plotting & Live PyShiny App (`seroepi.plotting`, `seroepi.app`)**:
22
+ - Theme-aware Altair plotters (`ChoroplethPlotter`, `BarPlotter`, `HeatmapPlotter`, `PyramidPlotter`, `UpSetPlotter`, `FormulationCoveragePlotter`, `FormulationStabilityPlotter`, `DifferentialPrevalencePlotter`, `RankShiftPlotter`).
23
+ - Modular OOP PyShiny web application (`HomeTab`, `DatasetTab`, `EstimationTab`, `FormulationTab`) deployed on Posit Connect Cloud and embedded in the documentation site.
@@ -0,0 +1,37 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use Kaptive in your work, please cite it using the following metadata."
3
+ title: "Fast and accurate in silico antigen typing with Kaptive 3"
4
+ authors:
5
+ - family-names: "Stanton"
6
+ given-names: "Thomas David"
7
+ - family-names: "Hetland"
8
+ given-names: "Marit A.K."
9
+ - family-names: "Löhr"
10
+ given-names: "Iren H."
11
+ - family-names: "Holt"
12
+ given-names: "Kathryn E."
13
+ - family-names: "Wyres"
14
+ given-names: "Kelly L."
15
+ type: software
16
+ url: "https://klebgenomics.github.io/Kaptive/"
17
+ repository-code: "https://github.com/klebgenomics/Kaptive"
18
+ preferred-citation:
19
+ type: article
20
+ authors:
21
+ - family-names: "Stanton"
22
+ given-names: "Thomas David"
23
+ - family-names: "Hetland"
24
+ given-names: "Marit A.K."
25
+ - family-names: "Löhr"
26
+ given-names: "Iren H."
27
+ - family-names: "Holt"
28
+ given-names: "Kathryn E."
29
+ - family-names: "Wyres"
30
+ given-names: "Kelly L."
31
+ title: "Fast and accurate in silico antigen typing with Kaptive 3"
32
+ journal: "Microbial Genomics"
33
+ year: 2025
34
+ volume: 11
35
+ issue: 6
36
+ doi: "10.1099/mgen.0.001428"
37
+ url: "https://www.microbiologyresearch.org/content/journal/mgen/10.1099/mgen.0.001428"
@@ -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
+ tomdstanton@gmail.com.
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.
@@ -0,0 +1,70 @@
1
+ # Contributing to `SeroEpi`
2
+
3
+ Contributions are welcome, and they are greatly appreciated! Every improvement — from bug reports and documentation refinements to statistical estimators, Altair plotters, and PyShiny dashboard workflows — helps advance open bacterial sero-epidemiology.
4
+
5
+ ## Types of Contributions
6
+
7
+ ### Report Bugs
8
+
9
+ Report bugs at https://github.com/SeroVerse/SeroEpi/issues.
10
+
11
+ If you are reporting a bug, please include:
12
+
13
+ - Your operating system name, Python version (`>=3.13`), and `jax`/`numpyro`/`polars` versions.
14
+ - Minimal cohort data or code snippets sufficient to reproduce the issue.
15
+ - Expected statistical or visualization behavior vs. actual output.
16
+
17
+ ### Fix Bugs & Implement Features
18
+
19
+ Look through the GitHub issues for open bugs or enhancements at https://github.com/SeroVerse/SeroEpi/issues. If you are proposing a new feature:
20
+
21
+ - Explain how it fits into `SeroEpi`'s architecture (`seroepi.dataset`, `seroepi.variables`, `seroepi.aggregate`, `seroepi.estimators`, `seroepi.plotting`, `seroepi.app`) and ADRs (`docs/adr/`).
22
+ - Preserve strict `Variable` identity (`ADR 001`), the `Aggregator` sufficiency-reduction contract (`ADR 002`), and the `StratifiedResultMixin` result interface (`ADR 003`).
23
+
24
+ ## Local Development Setup
25
+
26
+ `SeroEpi` uses [`uv`](https://docs.astral.sh/uv/) for dependency and environment management.
27
+
28
+ 1. Fork and clone the repository:
29
+
30
+ ```bash
31
+ git clone git@github.com:YOUR_USERNAME/SeroEpi.git
32
+ cd SeroEpi
33
+ ```
34
+
35
+ 2. Sync all development, test, and documentation dependency groups:
36
+
37
+ ```bash
38
+ uv sync --all-groups --all-extras
39
+ ```
40
+
41
+ 3. Create a feature branch for your changes:
42
+
43
+ ```bash
44
+ git checkout -b feat/your-feature-name
45
+ ```
46
+
47
+ ## Quality Checks & Testing
48
+
49
+ Before opening a pull request, verify that formatting, linting, static type checking, unit tests, and strict documentation builds all pass:
50
+
51
+ ```bash
52
+ # 1. Lint and check formatting with Ruff
53
+ uv run ruff check .
54
+ uv run ruff format --check .
55
+
56
+ # 2. Run static type checking with ty
57
+ uv run ty check src/
58
+
59
+ # 3. Run the pytest test suite
60
+ uv run pytest
61
+
62
+ # 4. Build the Zensical documentation site in strict mode
63
+ uv run zensical build --clean --strict
64
+ ```
65
+
66
+ ## Pull Request Guidelines
67
+
68
+ 1. Include unit tests in `tests/` covering any new estimators, plotters, or bug fixes.
69
+ 2. Document public classes, methods, and dataclasses using Google-style docstrings so `mkdocstrings` renders complete API references.
70
+ 3. Ensure all CI checks pass cleanly.