Skip to content

[FIX/MAINT] documentation build - #146

Merged
jdkent merged 2 commits into
masterfrom
claude/zen-goldberg-ld5c15
Sep 28, 2026
Merged

jdkent merged 2 commits into
masterfrom
claude/zen-goldberg-ld5c15

Conversation

@jdkent

@jdkent jdkent commented Sep 28, 2026

Copy link
Copy Markdown
Member

No description provided.

Claude and others added 2 commits September 28, 2026 21:15
Port of neurostuff/NiMARE#1156 to PyMARE, which has the same broken
conf.py.

`docs/conf.py` imported `MdInclude` and wired the `mdinclude` directive up by
hand. That import only ever worked on m2r2 <= 0.3.4, which shipped as a single
`m2r2.py` module. 1.0.0 repackaged the project and moved the class to
`m2r2.sphinx.directives`, so the package root has not exported it since; `doc`
required `m2r2` unpinned, so the docs build breaks as soon as the resolver
picks up a 1.x or later release:

    ImportError: cannot import name 'MdInclude' from 'm2r2'

1.1.0 added an `m2r2.mdinclude` extension whose `setup()` registers the same
five config values and the same `mdinclude` directive that conf.py registered
by hand, so load that instead and drop the manual block. Both halves have to
change together: leaving the manual registration in place alongside the
extension raises `Config value 'no_underscore_emphasis' already present`.

It is `m2r2.mdinclude` rather than plain `m2r2` because the full extension also
registers a source parser for `.md` files, which would collide with
recommonmark. Requires m2r2 >= 1.1 for the submodule, so `doc` now pins that
floor -- without it the resolver could pick 1.0.x, where neither the old import
nor the new extension exists.

`mdinclude` is used by docs/contributing.rst. Verified by building the real
docs with this conf against m2r2 2.1.0: the page renders CONTRIBUTING.md
(all eight of its headings), the build succeeds, and no m2r2 or mdinclude
warnings are emitted -- the four remaining warnings are pre-existing and
unrelated. Confirmed the old import still raises the ImportError above under
that same m2r2. flake8 reports exactly the same two pre-existing findings in
conf.py as it does on master.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013NtnctTrY9VtEm6AwSf2FS
`docs/sg_execution_times.rst` is regenerated by sphinx-gallery on every docs
build, holding the wall-clock timings of that particular run. It is a build
artifact, like the already-ignored docs/generated/ and docs/auto_examples/
beside it, so it should never be committed. NiMARE ignores it; PyMARE did not,
so a local docs build left it sitting untracked.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013NtnctTrY9VtEm6AwSf2FS
@codecov

codecov Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.20%. Comparing base (613c06b) to head (427eeb4).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #146   +/-   ##
=======================================
  Coverage   95.20%   95.20%           
=======================================
  Files          13       13           
  Lines        2025     2025           
=======================================
  Hits         1928     1928           
  Misses         97       97           

☔ 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.

@jdkent
jdkent merged commit 76efa4f into master Sep 28, 2026
19 checks passed
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