Prune patchwork Sphinx config; add class inheritance diagrams#119
Open
levon003 wants to merge 1 commit into
Open
Prune patchwork Sphinx config; add class inheritance diagrams#119levon003 wants to merge 1 commit into
levon003 wants to merge 1 commit into
Conversation
The conf.py was largely lifted from the matplotlib/pydata doc templates and carried a lot of unused machinery. Remove what isn't used and wire up the one piece worth keeping. Removed (all verified unused; build is clean under -W without them): - sphinx.ext.linkcode + the 55-line linkcode_resolve(), which was verbatim matplotlib boilerplate that always returned None here. viewcode already provides the working "[source]" links. - The no-op docutils_conf dict (Sphinx never reads a module-level var by that name). - numpydoc: the codebase is 100% Google-style (napoleon handles that), and its class-member tables were already disabled, so it did nothing. Dropping it also lets the numpydoc_show_class_members workaround go. - The three matplotlib.sphinxext.* extensions and sphinx_design / sphinx_tags, none of which are used by any directive. Their packages are dropped from the docs dependency group too. - Now-unused conf.py imports (inspect, Path, parse_version, flexeval). Added: - Two sphinx.ext.inheritance_diagram diagrams on the API page (the DataSource hierarchy and the peewee model hierarchy). These need Graphviz, so both CI workflows now install it and DEVELOPMENT.md notes the local prerequisite. - DEVELOPMENT.md notes that CI builds with -W (warnings are errors) and how to reproduce locally, plus a `make linkcheck` pointer. Addresses items 1, 2, 5, and 7 of #117. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Addresses items 1, 2, 5, and 7 of #117 — the cleanup of the matplotlib/pydata template cruft in
docs/conf.py.Removed (all verified unused —
make html SPHINXOPTS="-W --keep-going"is clean without them)sphinx.ext.linkcode+ the 55-linelinkcode_resolve()— verbatim matplotlib boilerplate that always returnedNonehere (it guards onmatplotlib/paths).viewcodealready provides the working[source]links. (item 1)docutils_confdict — Sphinx never reads a module-level variable by that name. (item 2)numpydoc— the codebase is 100% Google-style (handled bynapoleon), and its class-member tables were already disabled, so it did nothing. Dropping it also removes thenumpydoc_show_class_membersworkaround. (item 5)matplotlib.sphinxext.*extensions andsphinx_design/sphinx_tags— no directive uses them. Their packages are removed from thedocsdependency group too. (item 5)conf.pyimports (inspect,Path,parse_version,flexeval).Net:
conf.pyloses ~87 lines.Added
inheritance_diagramdiagrams on the API page (item 5 — "use it rather than remove it"): the polymorphicDataSourcehierarchy and the peewee model hierarchy. These need Graphviz, so both CI workflows nowapt-get install graphviz, and DEVELOPMENT.md documents the local prerequisite (brew install graphviz).-W(warnings = errors) and how to reproduce locally, plus amake linkcheckpointer (item 7 — documented, not automated, since it makes network requests).Notes / left for you
sphinxext.github(the local extension defining:ghissue:/:ghpull:roles) is also currently unused, but I kept it — it's a self-contained local utility (handy for release notes), not imported template cruft. Easy to drop if you'd rather.0.5.3bump on Fix malformed-RST docstring warnings and enable -W in CI #118 covers the release.🤖 Generated with Claude Code