Repository navigation
Add GR&R reference tests, CI, and TestEvidence export - #1
Merged
Merged
Conversation
- tests/test_grr_calc.py: compute_grr checked against the AIAG MSA 4th Ed. reference study, a hand-calculated 2x2x2 study, and K constants re-derived from d2*; strict xfail pins the out-of-control part-label row-order issue - --test-evidence / --requirement-ids: traceability-matrix-dhf TestEvidence (type=GRR) pointing at the PDF; PDF output byte-identical - GitHub Actions CI on Python 3.9/3.11/3.12; README badges and docs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What changed
Phase 1 — Tests + CI
tests/test_grr_calc.pycheckscompute_grragainst numbers from outside the tool:.github/workflows/ci.yml: pytest with coverage on Python 3.9 / 3.11 / 3.12.Phase 2 —
--test-evidence/--requirement-idsTestEvidencerecord:type="GRR",source_repo="grr-analysis-tool",evidence_uri=file://URI of the generated PDF,linked_requirement_idsfrom--requirement-ids, plus a summary and the key metrics.grr_tool.pyfor all three sample datasets, and a test checks it on every CI run.schemas/test-evidence.schema.json. The emitted evidence validates against it for all three sample studies.Phase 3 — Docs
Reviewer notes
The
TestEvidenceschema doesn't exist in traceability-matrix-dhf yet. That repo only hasValidationEvidenceandVerificationRecord;TestEvidenceis only in its design spec. The JSON Schema here follows the spec fields and is the contract until the real model lands. Check the two still match when it does.How
resultis set (please review):passneeds ACCEPTABLE and ndc ≥ 5.fail.conditional.conditionalisn't inVerificationRecord's pass/fail/blocked values.Known bug, not fixed (the change is additive only): the out-of-control part labels are wrong when the CSV isn't sorted by part within each operator. The metrics are unaffected, and all bundled samples are sorted. It's pinned as a strict
xfailand noted in the README. The fix is to key the ranges by part name.grr_tool.pyline coverage is 29%. Most of the file is chart and PDF code, and coverage doesn't count the command-line tests, which run in a separate process.compute_grritself is fully exercised.🤖 Generated with Claude Code