✅ test: unskip the doctests - #47
Merged
nstarman merged 1 commit intoAug 19, 2026
Merged
Conversation
Closes GalacticDynamics#17. Every doctest now runs on both diffrax 0.6 and 0.7. Previously six examples carried `.. skip: next if(DIFFRAX_LT_070, ...)` and `README.md` was dropped wholesale on diffrax < 0.7, so the oldest-dependency CI job verified none of them. Removing the skips showed the guards were wider than the problem: only 8 examples actually failed on 0.6, and one of the six skip directives guarded an example that passed there anyway. `README.md` was being dropped entirely to cover 3 failures out of ~52 examples. The 8 real failures were all reprs of diffrax-owned objects. They now elide what diffrax owns — field ordering, whether default-valued fields print, `weak_i64` vs `i64`, `<class '...'>` vs the bare dotted path — under the `ELLIPSIS` flag the suite already sets, and stay exact on diffraxtra's own values. That leaves `DIFFRAX_LT_070`, `setup_namespace`, `ReSTSkipParser` and `pytest_collection_modifyitems` with nothing to do, so `conftest.py` loses them along with the `diffrax` and `packaging` imports they needed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #47 +/- ##
=======================================
Coverage ? 98.30%
=======================================
Files ? 5
Lines ? 177
Branches ? 0
=======================================
Hits ? 174
Misses ? 3
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nstarman
added a commit
that referenced
this pull request
Aug 19, 2026
Co-authored-by: Nathaniel Starkman <nstarman@users.noreply.github.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.
Closes #17.
Every doctest now runs on both diffrax 0.6 and 0.7. Previously six examples
carried
.. skip: next if(DIFFRAX_LT_070, ...), andREADME.mdwas droppedwholesale when diffrax < 0.7 — so CI's
check_oldestjob verified none of them.Scoping it empirically
Rather than assume all six guards were load-bearing, I removed every skip and
ran the suite against CI's own oldest resolution
(
uv run --group test --resolution lowest→ diffrax 0.6.0, equinox 0.11.5,jax 0.4.35). Result: 8 failures, narrower than the guards:
diffeq.py, theSolutionrepr) guarded anexample that passes on 0.6 anyway — its trailing
...already absorbed thedifference.
README.mdwas being dropped entirely to cover 3 failures out of ~52examples.
The fix
All 8 failures were reprs of diffrax-owned objects. They now elide what belongs
to diffrax and stay exact on what belongs to diffraxtra:
DiffEqSolver(...solver=Dopri5(...)...)weak_i64[1]vsi64[1]ts_size=...i64[1]<class 'diffrax...._Dopri5Interpolation'>vs the bare dotted pathinterpolation_cls=..._Dopri5Interpolation...ELLIPSISis already inoptionflags, so this needs no new configuration.With no skips left,
DIFFRAX_LT_070,setup_namespace,ReSTSkipParserandpytest_collection_modifyitemshave nothing to do —conftest.pydrops themand the
diffraxandpackagingimports they required, going from 62 to 39lines.
Verification
nox -s mypyclean,pre-commit run --all-filesclean(164 → 158 collected items is the six removed
skipdirectives, which sybilcounted as items.)
AGENTS.mdand the code-review skill documented the machinery this removes;both now say to elide the varying tokens rather than guard the example.
🤖 Generated with Claude Code