Skip to content

Add the facility active proportion field #71

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

natemcintosh
Copy link
Contributor

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] [2] [3] [4]

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] [2]
  • Updated the extract_user_args function to parse facility_active_proportion from environment variables, with error handling for invalid formats. [1] [2]

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] [2]

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] [2] [3]
  • Added tests to ensure the default value of facility_active_proportion is correctly applied when not explicitly provided. [1] [2]

also added 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
@natemcintosh natemcintosh linked an issue Jun 30, 2025 that may be closed by this pull request
@natemcintosh natemcintosh changed the title dd the facility active proportion field Add the facility active proportion field Jul 1, 2025
Copy link
Contributor

@kgostic kgostic left a comment

Choose a reason for hiding this comment

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

At a very high level lgtm. Thanks for being on top of keeping this in sync.

Copy link
Collaborator

@athowes athowes left a comment

Choose a reason for hiding this comment

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

I don't know the codebase well enough to have a good handle on all the places that facility_active_proportion should be included. What you have seems reasonable. I've just added a few conceptual comments.

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.

Add facility_active_proportion field
3 participants