Add the facility active proportion field #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
facility_active_proportion
as a new argument to configuration generation functions (generate_config
,generate_rerun_config
,generate_backfill_config
, andgenerate_task_configs
). It is validated to ensure it is a float between 0 and 1, with a default value of 1.0. [1] [2] [3] [4]Configuration and Constants Updates:
facility_active_proportion
to the default configuration constants and included it in the list of required parameters for task generation. [1] [2]extract_user_args
function to parsefacility_active_proportion
from environment variables, with error handling for invalid formats. [1] [2]Validation Enhancements:
validate_args
function to include validation logic forfacility_active_proportion
, ensuring it is a valid float within the acceptable range. [1] [2]Test Coverage:
facility_active_proportion
is correctly passed, validated, and included in generated configurations. [1] [2] [3]facility_active_proportion
is correctly applied when not explicitly provided. [1] [2]