-
Notifications
You must be signed in to change notification settings - Fork 3
Renaming model measles quarantine and other changes #119
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
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
…iBio/epiworldR into patch-rename-measlesmodel
for more information, see https://pre-commit.ci
…iBio/epiworldR into patch-rename-measlesmodel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request implements several updates to the epiworldR package, primarily focused on renaming and improving the measles models. The most significant change is renaming ModelMeaslesQuarantine
to ModelMeaslesSchool
with proper deprecation handling, along with interface improvements to ModelMeaslesMixing
and various infrastructure updates.
- Rename
ModelMeaslesQuarantine
toModelMeaslesSchool
with deprecation warning - Remove
vname
parameter fromModelMeaslesMixing
and provide default values for epidemiological parameters - Update C++ tracking implementation for more precise agent interaction monitoring
Reviewed Changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/epimodels.cpp |
Updates C++ function signatures to match model renames and parameter changes |
src/cpp11.cpp |
Updates auto-generated C++ bindings for renamed functions and parameter changes |
man/*.Rd |
Updates documentation cross-references to use new model name |
inst/tinytest/test-measlesmixing.R |
Removes tests for deprecated vname parameter |
inst/include/epiworld/models/measlesquarantine.hpp |
Renames class and functions from ModelMeaslesQuarantine to ModelMeaslesSchool |
inst/include/epiworld/models/measlesmixing.hpp |
Removes vname parameter and improves contact tracking with date information |
inst/include/epiworld/epiworld.hpp |
Increments C++ library patch version |
R/cpp11.R |
Updates R function signatures to match C++ changes |
R/ModelMeaslesSchool.R |
Renames main function and adds deprecation wrapper |
R/ModelMeaslesMixing.R |
Removes vname parameter and adds default values |
NEWS.md |
Documents version update and model name change |
NAMESPACE |
Exports new model name |
.github/workflows/r.yml |
Installs curl for GitHub Actions |
.devcontainer/Dockerfile |
Updates R version to 4.5.1 |
.devcontainer/.vscode/settings.json |
Adds VSCode R development settings |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
{"_epiworldR_ModelDiffNet_cpp", (DL_FUNC) &_epiworldR_ModelDiffNet_cpp, 8}, | ||
{"_epiworldR_ModelMeaslesMixing_cpp", (DL_FUNC) &_epiworldR_ModelMeaslesMixing_cpp, 21}, | ||
{"_epiworldR_ModelMeaslesQuarantine_cpp", (DL_FUNC) &_epiworldR_ModelMeaslesQuarantine_cpp, 16}, | ||
{"_epiworldR_ModelMeaslesMixing_cpp", (DL_FUNC) &_epiworldR_ModelMeaslesMixing_cpp, 20}, |
Copilot
AI
Sep 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter count for ModelMeaslesMixing_cpp should be 20, but the actual function signature shows 21 parameters. This mismatch will cause runtime errors when R tries to call the C++ function.
{"_epiworldR_ModelMeaslesMixing_cpp", (DL_FUNC) &_epiworldR_ModelMeaslesMixing_cpp, 20}, | |
{"_epiworldR_ModelMeaslesMixing_cpp", (DL_FUNC) &_epiworldR_ModelMeaslesMixing_cpp, 21}, |
Copilot uses AI. Check for mistakes.
isolation_period, | ||
vax_reduction_recovery_rate = .5, | ||
transmission_rate = .9, | ||
contact_rate = 15 / transmission_rate / prodromal_period, |
Copilot
AI
Sep 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value for contact_rate references prodromal_period, but prodromal_period is defined later in the parameter list (line 125). This will cause an error since R evaluates default values left-to-right and prodromal_period is not yet available.
Copilot uses AI. Check for mistakes.
#' | ||
#' The default value for the contact rate is an approximation to the disease's | ||
#' basic reproduction number (R0), but it is not 100% accurate. A more accurate | ||
#' way to se the contact rate is available, and will be distributed in the |
Copilot
AI
Sep 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in documentation: 'se' should be 'set'.
#' way to se the contact rate is available, and will be distributed in the | |
#' way to set the contact rate is available, and will be distributed in the |
Copilot uses AI. Check for mistakes.
This pull request introduces several updates and improvements to the epiworldR package, focusing on the measles models and developer tooling. The most significant changes are the renaming and deprecation of the
ModelMeaslesQuarantine
model in favor ofModelMeaslesSchool
, enhancements to theModelMeaslesMixing
model interface and documentation, and updates to the underlying C++ code for tracking agent interactions. Additionally, the package version has been incremented and developer environment configurations have been improved.Model Renaming and Deprecation
ModelMeaslesQuarantine
model has been renamed toModelMeaslesSchool
, and the old function is now deprecated with a warning to use the new name instead. All relevant code, documentation, and C++ bindings have been updated to reflect this change. (R/ModelMeaslesSchool.R
,NAMESPACE
,NEWS.md
,R/cpp11.R
) [1] [2] [3] [4] [5] [6]Model Interface and Documentation Improvements
ModelMeaslesMixing
R function interface was refactored to remove thevname
parameter and provide sensible defaults for key epidemiological parameters, improving usability and clarity. Documentation was updated to match the new interface and provide more accurate information on model behavior. (R/ModelMeaslesMixing.R
) [1] [2] [3] [4] [5]inst/include/epiworld/models/measlesmixing.hpp
) [1] [2] [3] [4]C++ Model Enhancements
tracking_matrix_date
toModelMeaslesMixing
for more precise tracking of agent interaction dates, and refactored the tracking logic for improved accuracy and efficiency. (inst/include/epiworld/models/measlesmixing.hpp
) [1] [2] [3]Versioning and Release Notes
inst/include/epiworld/epiworld.hpp
,NEWS.md
) [1] [2]Developer Tooling and Environment
.devcontainer/Dockerfile
,.devcontainer/.vscode/settings.json
,.github/workflows/r.yml
) [1] [2] [3]