Generate and publish a validation summary - #120
Merged
Conversation
The validation suite already cross-checks geometry/RMSD/contacts vs
MDAnalysis, bonds/chem/descriptors vs RDKit, secondary structure vs
mkdssp, pocket interactions vs PLIP, and a tier of physical invariants —
but the results only landed in the CI log. This surfaces them.
A small pytest plugin (tests/validation/conftest.py) records the
pass/skip/fail outcome of every validation check (including whole modules
skipped because a reference tool is absent) and, when run with
--validation-summary-dir=DIR, writes validation-summary.{md,json}. The
summary is derived entirely from the run, so it cannot drift from the
tests; only the human area labels live in tests/validation/_summary.py.
CI now runs the validation job with that flag, prints the Markdown to the
workflow run page (GITHUB_STEP_SUMMARY) and uploads both files as the
validation-summary artifact — so the scientific boundaries are visible at
a glance without trawling the logs.
Adds unit tests for the pure formatting (test_summary_generator.py, runs
in the normal suite, no reference tools needed) and documents it in
docs/validation.md, the README, and the CHANGELOG.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
The validation work is strong but invisible: the suite cross-checks geometry/RMSD/contacts vs MDAnalysis, bonds/chemistry/descriptors vs RDKit, secondary structure vs mkdssp, pocket interactions vs PLIP, plus a tier of physical invariants — yet the results only ever landed in the CI log. This makes them legible.
A small pytest plugin records the pass / skip / fail outcome of every validation check (including whole modules skipped because a reference tool is absent) and, when run with
--validation-summary-dir=DIR, writes:validation-summary.md— a table of area · reference · passed/skipped/failed, with per-check detail for anything skipped or failedvalidation-summary.json— the same data, machine-readableGenerated, so it can't drift
Every count comes from the run itself — the summary is produced by the tests, not authored alongside them. Only the human-readable area labels live in
tests/validation/_summary.py; new*_refmodules are picked up automatically with a fallback label.Visible in CI
The
validationjob now:--validation-summary-dir=.,cats the Markdown into$GITHUB_STEP_SUMMARYso it renders on the workflow run page (Summary tab), andvalidation-summaryartifact (if: always(), so a failing check still publishes — you see exactly which one).That run, with all reference tools installed, is the authoritative snapshot of what is currently cross-checked.
Example (generated locally)
Design notes
pytest_runtest_logreport(per-test pass/fail/skip) andpytest_collectreport(whole modules skipped when a tool is missing). Nopytest-json-reportdependency.--validation-summary-dirthe plugin records nothing user-visible and writes no files, so normalpytestruns are unchanged.docs/validation.mdgains a "Generated summary" section explaining and linking it.Tests & docs
tests/validation/test_summary_generator.py— 6 unit tests for the pure aggregation/formatting (runs in the normal suite; no reference tools needed).ruffclean;ci.ymlvalidated.docs/validation.md"Generated summary" section, README "Scientific validation" footer, CHANGELOG.