You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Nate's Summary
Added the new field, tests, and docstrings. I think I got it into all
the necessary places, but it's been a few months since I worked with
this repo so I may have forgotten something.
## Copilot's Summary
This pull request introduces a new parameter,
`facility_active_proportion`, to the EpiNow2 configuration generation
pipeline. This parameter represents the minimum proportion of days a
facility must be active during the modeling period and is integrated
across multiple functions, constants, and tests to ensure proper
handling and validation.
### Core Feature Addition:
* Introduced `facility_active_proportion` as a new argument to
configuration generation functions (`generate_config`,
`generate_rerun_config`, `generate_backfill_config`, and
`generate_task_configs`). It is validated to ensure it is a float
between 0 and 1, with a default value of 1.0.
[[1]](diffhunk://#diff-d56536f6759432dcf08d9f3961d8344b4e7014d136f4c4450c4069e829e86926R44)
[[2]](diffhunk://#diff-d56536f6759432dcf08d9f3961d8344b4e7014d136f4c4450c4069e829e86926R164)
[[3]](diffhunk://#diff-d56536f6759432dcf08d9f3961d8344b4e7014d136f4c4450c4069e829e86926R348)
[[4]](diffhunk://#diff-ab59143b1ba343d18c0ed85e6e50cacaa76d64fad93c142b8f349b5e61db04f8R348)
### Configuration and Constants Updates:
* Added `facility_active_proportion` to the default configuration
constants and included it in the list of required parameters for task
generation.
[[1]](diffhunk://#diff-1e19d89684d25107f8db5de423069387a48db2ce4ea6bc4421388b450e8c3938R16)
[[2]](diffhunk://#diff-1e19d89684d25107f8db5de423069387a48db2ce4ea6bc4421388b450e8c3938R97)
* Updated the `extract_user_args` function to parse
`facility_active_proportion` from environment variables, with error
handling for invalid formats.
[[1]](diffhunk://#diff-ab59143b1ba343d18c0ed85e6e50cacaa76d64fad93c142b8f349b5e61db04f8R27-R39)
[[2]](diffhunk://#diff-ab59143b1ba343d18c0ed85e6e50cacaa76d64fad93c142b8f349b5e61db04f8R97)
### Validation Enhancements:
* Extended the `validate_args` function to include validation logic for
`facility_active_proportion`, ensuring it is a valid float within the
acceptable range.
[[1]](diffhunk://#diff-ab59143b1ba343d18c0ed85e6e50cacaa76d64fad93c142b8f349b5e61db04f8R204)
[[2]](diffhunk://#diff-ab59143b1ba343d18c0ed85e6e50cacaa76d64fad93c142b8f349b5e61db04f8R278-R287)
### Test Coverage:
* Updated existing test cases and added new assertions to verify that
`facility_active_proportion` is correctly passed, validated, and
included in generated configurations.
[[1]](diffhunk://#diff-d5d888969fd8e06ca26b226838d662a18b517912f4df62b41e87e8f8a2e1d9ffR50)
[[2]](diffhunk://#diff-d5d888969fd8e06ca26b226838d662a18b517912f4df62b41e87e8f8a2e1d9ffR286)
[[3]](diffhunk://#diff-8c80c5198a3e12b29443be1e74e33e55e5bd044c05c5d81c6ac2e5cf1acb6e2eR49-R53)
* Added tests to ensure the default value of
`facility_active_proportion` is correctly applied when not explicitly
provided.
[[1]](diffhunk://#diff-8c80c5198a3e12b29443be1e74e33e55e5bd044c05c5d81c6ac2e5cf1acb6e2eR49-R53)
[[2]](diffhunk://#diff-8c80c5198a3e12b29443be1e74e33e55e5bd044c05c5d81c6ac2e5cf1acb6e2eR83-R87)
---------
Co-authored-by: Adam Howes <adamthowes@gmail.com>
0 commit comments