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

update end to end test #353

Merged
merged 35 commits into from
Mar 3, 2025
Merged

update end to end test #353

merged 35 commits into from
Mar 3, 2025

Conversation

sbidari
Copy link
Collaborator

@sbidari sbidari commented Feb 14, 2025

Key changes:

Adds generate_fake_nwss_data function in generate_test_data.R
Modifies end_to_end_test.sh to fit Pyrenew-HEW model for COVID-19

Adds PyrenewWastewaterData class to handle wastewater data.
Modifies build_model_from_dir and related functions to incorporate wastewater data.
Adds priors for wastewater-related parameters in prod_priors.py and build_pyrenew_model.py
Modifies forecast_state.py to handle wastewater data:
-scan for NWSS data conditional on fit_wastewater flag
-raise errors if wastewater data is not available for the requested report date.
Moved calculation of pop_fraction from PyrenewHEWData to prep_data.py (required arg for LatentInfectionProcess)

Copy link

codecov bot commented Feb 14, 2025

Codecov Report

Attention: Patch coverage is 82.05128% with 21 lines in your changes missing coverage. Please review.

Project coverage is 30.47%. Comparing base (128ae86) to head (5d52a5e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pipelines/forecast_state.py 0.00% 12 Missing ⚠️
pipelines/prep_data.py 0.00% 6 Missing ⚠️
pyrenew_hew/pyrenew_wastewater_data.py 97.36% 2 Missing ⚠️
pyrenew_hew/pyrenew_hew_data.py 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #353      +/-   ##
==========================================
+ Coverage   29.26%   30.47%   +1.21%     
==========================================
  Files          25       26       +1     
  Lines        1910     1939      +29     
==========================================
+ Hits          559      591      +32     
+ Misses       1351     1348       -3     
Flag Coverage Δ
hewr 35.35% <ø> (ø)
pipelines 14.41% <25.00%> (+0.24%) ⬆️
pyrenew_hew 42.02% <96.77%> (+3.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sbidari sbidari force-pushed the sb-update-end-to-end-test branch from 6a593ae to 98b24c3 Compare February 19, 2025 22:32
@sbidari sbidari force-pushed the sb-update-end-to-end-test branch from 5c47273 to 8f53d08 Compare February 20, 2025 23:14
@sbidari sbidari marked this pull request as ready for review February 26, 2025 15:38
@sbidari sbidari requested a review from damonbayer as a code owner February 26, 2025 15:38
@sbidari sbidari requested a review from dylanhmorris February 26, 2025 15:38
Copy link
Contributor

@dylanhmorris dylanhmorris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking very good. Thanks, @sbidari! Just a few questions before I review further.

Co-authored-by: Dylan H. Morris <dylanhmorris@users.noreply.github.com>
@sbidari
Copy link
Collaborator Author

sbidari commented Feb 27, 2025

@dylanhmorris I have made the changes we discussed yesterday.

This passes the pipeline run check but fails on a test for PyrenewWastewaterData. The issue is that site_pop (within site_subpop_spine) is interpreted as Object when accessed from build_model_from_dir but is interpreted as Float when called from test_pyrenew_wastewater_data leading to this error. I don't really understand what's causing this difference

sbidari and others added 3 commits February 27, 2025 17:25
Co-authored-by: Dylan H. Morris <dylanhmorris@users.noreply.github.com>
* Adjust to fix test

* Update pyrenew_hew/pyrenew_wastewater_data.py

* Hack fix

* pre-commit

---------

Co-authored-by: sbidari <zib2@cdc.gov>
@sbidari sbidari requested a review from dylanhmorris February 27, 2025 22:54
Copy link
Contributor

@dylanhmorris dylanhmorris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question and one suggestion. Thanks, @sbidari!

@sbidari sbidari requested a review from dylanhmorris March 3, 2025 16:06
Copy link
Contributor

@dylanhmorris dylanhmorris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM provided tests pass, thanks @sbidari!. In the future we should more fully separate the subpopulation specification from the wastewater data specification (so you can do multi-subpop models without observed wastewater). This should also help with the pop-fraction stuff. But it's out of scope for now.

@dylanhmorris dylanhmorris enabled auto-merge (squash) March 3, 2025 17:31
@dylanhmorris dylanhmorris merged commit 2f0de0e into main Mar 3, 2025
15 checks passed
@dylanhmorris dylanhmorris deleted the sb-update-end-to-end-test branch March 3, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants