Validator 2 - #374
Open
r-ash wants to merge 3 commits into
Open
Conversation
R scripts: parse args with docopt::docopt() (matching leapfrogr/scripts/create_model_output.R's existing convention) instead of raw commandArgs(); call leapfrog::/leapfrog::: qualified rather than library(leapfrog). Ruff: the ignore list was copied wholesale from codegen/pyproject.toml. Cleared it and re-ran against the real codebase -- only docstring rules and subprocess S603/S607 actually fired. Added real docstrings to every flagged public class/function in src/ (16 sites), exempted test functions from docstring rules per-file (matching leapfrog-py/tests' existing undocumented-test-function convention), and kept S603/S607 ignored with a one-line justification -- shelling out to git/R/uv with argument lists is this tool's whole job, not untrusted input reaching a shell. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ssue 17) Extends leapfrog-validate's diff command from the walking skeleton's single total_population check to all five blessed indicators (adding hiv_population, treatment_population, aids_deaths_single_age, aids_deaths_on_treatment), through one common registry shape. The two indicators with no p_-level array are reconstructed by summing the adult/ child ART arrays over CD4/duration and concatenating their age domains. Adds a reviewable, per-PJNZ exclusion mechanism (leapfrog_validate.exclusions) that requires both a reason and a link, so a known discrepancy can be carved out of the tolerance rollup without loosening tolerance for any other PJNZ. diff now checks all five indicators by default with a strict AND rollup (--indicator still selects one), and a new --pjnz option matches exclusion entries. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Range read as Python's half-open range() semantics, but Exclusion's year/sex/age bounds are inclusive on both ends -- caught in code review.
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.