Skip to content

Validator 2 - #374

Open
r-ash wants to merge 3 commits into
validator-1from
validator-2
Open

Validator 2#374
r-ash wants to merge 3 commits into
validator-1from
validator-2

Conversation

@r-ash

@r-ash r-ash commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

r-ash and others added 3 commits August 13, 2026 14:54
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.
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.

1 participant