Update argument consistency to match propensity#51
Merged
malcolmbarrett merged 8 commits intomainfrom Aug 13, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates argument consistency throughout the halfmoon package to match the .exposure parameter name from propensity scoring functions. The changes standardize parameter naming to improve consistency and user experience across the API.
Key changes include:
- Renamed
treatmentto.exposureandweightsto.weightsthroughout test files - Updated
.wtsto.weightsin function calls - Changed
reference_groupto.reference_levelfor categorical variables - Updated
treatment_levelto.focal_levelfor focal level specifications
Reviewed Changes
Copilot reviewed 88 out of 101 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/testthat/test-plot_stratified_residuals.R | Updates function calls to use .exposure instead of treatment |
| tests/testthat/test-plot_roc.R | Changes aesthetic mapping from truth to exposure |
| tests/testthat/test-plot_qq.R | Updates .wts to .weights throughout |
| tests/testthat/test-plot_mirror_distributions.R | Updates weight and reference level parameter names |
| tests/testthat/test-plot_ess.R | Updates weight parameter names throughout |
| tests/testthat/test-plot_balance.R | Updates weight and reference level parameter names |
| tests/testthat/test-numeric-psw-equivalence.R | Updates weight parameter names for balance functions |
| tests/testthat/test-geom_roc.R | Updates aesthetic mapping and focal level parameter |
| tests/testthat/test-geom_calibration.R | Updates focal level parameter name |
| tests/testthat/test-error-messages.R | Updates parameter names in error tests |
| tests/testthat/test-compute_qq.R | Updates weight and reference level parameter names |
| tests/testthat/test-compute_balance_categorical.R | Updates balance function parameter names |
| tests/testthat/test-compute_balance.R | Updates all balance function parameter names |
| tests/testthat/test-check_model_auc.R | Updates weight and focal level parameter names |
| tests/testthat/test-check_ess.R | Updates weight parameter names |
| tests/testthat/test-check_balance.R | Updates weight and reference level parameter names |
| tests/testthat/test-bal_qq.R | Updates weight and reference level parameter names |
| tests/testthat/test-bal_prognostic_score.R | Updates exposure, covariate, and weight parameter names |
| tests/testthat/test-bal_model_auc.R | Updates focal level parameter name |
| tests/testthat/test-autoplot-methods.R | Updates weight parameter names |
| man/*.Rd files | Updates documentation parameter names |
| _snaps/*.md files | Updates snapshot test parameter names |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.