Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

~~Test~~ Demo using data from WW R package #55

Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3dc1df9
Adding a testing dataset from the WW repo
gvegayon Apr 2, 2024
44c837b
Correcting how path to wastewater is retrieved
gvegayon Apr 2, 2024
40f1119
Adding missing file (TSV wastewater)
gvegayon Apr 2, 2024
e1a079b
Merge branch 'main' into 3-replicate-model-2-from-cdcgovwastewater-in…
gvegayon Apr 4, 2024
729ae57
Adding interval datasets and starting example with ww data
gvegayon Apr 4, 2024
c865c37
Model starts to fit but fails b/c of too big mean for negbinom [skip …
gvegayon Apr 5, 2024
c501a0d
Adding math to the example-with-datasets plus clarifications in code
gvegayon Apr 8, 2024
aeda673
Model fit runs OK (yupi)
gvegayon Apr 9, 2024
0ac530f
Adding deterministic test and fixing qmd
gvegayon Apr 9, 2024
e6f56a8
Adding weekday effect to model. Still not good enough
gvegayon Apr 10, 2024
e749c74
Rewriting downloaders to python
gvegayon Apr 11, 2024
338dee0
Using os.path.exist
gvegayon Apr 11, 2024
b373b17
Bringing changes from main
gvegayon Apr 16, 2024
5c26233
Adding test for plot
gvegayon Apr 16, 2024
e73adaf
Updating poetry.lock
gvegayon Apr 16, 2024
eff3212
Reference image for testing in the correct location
gvegayon Apr 16, 2024
9e5e4b4
Adding padding for models
gvegayon Apr 17, 2024
1d6d2e1
Adding padding test
gvegayon Apr 17, 2024
4a943fb
Renaming obs proc in models and working on data demo
gvegayon Apr 18, 2024
9a6e1b0
Adding figure of latent infections and extending padding section
gvegayon Apr 18, 2024
9ff6b11
Update model/src/pyrenew/datasets/data-raw/wastewater.R
gvegayon Apr 19, 2024
cc407c1
Update model/src/pyrenew/datasets/data-raw/wastewater.R
gvegayon Apr 19, 2024
cb81af5
Update model/src/pyrenew/datasets/data-raw/infection_admission_interv…
gvegayon Apr 19, 2024
4fc97ed
Typos, language, and more content to qmd doc
gvegayon Apr 19, 2024
e6d3051
Update model/src/pyrenew/datasets/data-raw/generation_interval.py
gvegayon Apr 19, 2024
66bb81c
Merge branch 'main' into 3-replicate-model-2-from-cdcgovwastewater-in…
gvegayon Apr 22, 2024
e72c000
Fixing updates with tuple check
gvegayon Apr 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test_model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- name: run tests
run: |
poetry run -C model pytest \
--mpl --mpl-default-tolerance=10 \
--cov=pyrenew --cov-report term --cov-report xml model
- name: Upload coverage to Codecov
Expand Down
32 changes: 27 additions & 5 deletions model/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,41 @@ install:
poetry install

test:
poetry run pytest
poetry run pytest --mpl --mpl-default-tolerance=10

docs: docs/pyrenew_demo.md docs/getting-started.md
docs: docs/pyrenew_demo.md docs/getting-started.md \
docs/example-with-datasets.md

docs/pyrenew_demo.md: docs/pyrenew_demo.qmd
poetry run quarto render docs/pyrenew_demo.qmd

docs/getting-started.md: docs/getting-started.qmd
poetry run quarto render docs/getting-started.qmd

docs/example-with-datasets.md: docs/example-with-datasets.qmd
poetry run quarto render docs/example-with-datasets.qmd

docs/py: docs/notebooks
jupyter nbconvert --to python docs/pyrenew_demo.ipynb
jupyter nbconvert --to python docs/getting-started.ipynb
jupyter nbconvert --to python docs/example-with-datasets.ipynb

docs/notebooks:
quarto convert docs/pyrenew_demo.qmd --output docs/pyrenew_demo.ipynb
quarto convert docs/getting-started.qmd --output docs/getting-started.ipynb
quarto convert docs/example-with-datasets.qmd --output \
docs/example-with-datasets.ipynb

test_images:
echo "Generating reference images for tests"
poetry run pytest --mpl-generate-path=src/test/baseline

clean:
rm -rf docs/*_files/
rm -f docs/getting-started.ipynb
rm -f docs/pyrenew_demo.ipynb
for i in .py, .md, .ipynb; do \
rm -f docs/getting-started.$$i; \
rm -f docs/pyrenew_demo.$$i; \
rm -f docs/example-with-datasets.$$i; \
done

.PHONY: install test docs clean
.PHONY: install test docs clean docs/notebooks docs/py test_images
Loading