Skip to content

✅ test: unskip the doctests - #47

Merged
nstarman merged 1 commit into
GalacticDynamics:mainfrom
nstarman:claude/issue17-unskip-doctests
Aug 19, 2026
Merged

✅ test: unskip the doctests#47
nstarman merged 1 commit into
GalacticDynamics:mainfrom
nstarman:claude/issue17-unskip-doctests

Conversation

@nstarman

Copy link
Copy Markdown
Contributor

Closes #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 when diffrax < 0.7 — so CI's check_oldest job 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:

  • One of the six skip directives (diffeq.py, the Solution repr) guarded an
    example that passes on 0.6 anyway — its trailing ... already absorbed the
    difference.
  • README.md was being dropped entirely to cover 3 failures out of ~52
    examples.

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:

Varies across 0.6 → 0.7 Now written as
default-valued fields printed vs hidden DiffEqSolver(...solver=Dopri5(...)...)
weak_i64[1] vs i64[1] ts_size=...i64[1]
<class 'diffrax...._Dopri5Interpolation'> vs the bare dotted path interpolation_cls=..._Dopri5Interpolation...

ELLIPSIS is already in optionflags, so this needs no new configuration.

With no skips left, DIFFRAX_LT_070, setup_namespace, ReSTSkipParser and
pytest_collection_modifyitems have nothing to do — conftest.py drops them
and the diffrax and packaging imports they required, going from 62 to 39
lines.

Verification

  • diffrax 0.6.0: 158 passed
  • diffrax 0.7.0: 158 passed
  • nox -s mypy clean, pre-commit run --all-files clean

(164 → 158 collected items is the six removed skip directives, which sybil
counted as items.)

AGENTS.md and 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

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>
@nstarman nstarman added this to the v1.6.x milestone Aug 19, 2026
@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@506de69). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nstarman
nstarman merged commit 46b2c23 into GalacticDynamics:main Aug 19, 2026
21 checks passed
@nstarman
nstarman deleted the claude/issue17-unskip-doctests branch August 19, 2026 03:52
nstarman added a commit that referenced this pull request Aug 19, 2026
Co-authored-by: Nathaniel Starkman <nstarman@users.noreply.github.com>
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.

unskip doctests

1 participant