Add a Sphinx documentation site: MyST guides + autodoc API reference on Read the Docs#122
Conversation
- search/lucky INPUT blocks: bullet continuation lines were over- or staircase-indented, which docutils parses as stray block quotes and broken definition lists (three errors per docstring under Sphinx). Whitespace-only reflow; rendered text unchanged. - NotificationListener: ``LISTEN``ed leaves the inline literal unterminated (no separator after the closing backticks); reworded. - QueryLanguage.md and DataManagement.md had no top-level title (they began at ##); added H1s, which the site needs for navigation and which GitHub renders better too. - Searching.md's table of contents pointed at a raw <a name> anchor that Markdown processors do not index; point it at the heading's own slug (the anchor itself stays, so old deep links keep working). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sphinx + MyST-Parser + autodoc with the furo theme, designed to be served on Read the Docs. The narrative guides are the existing root-level Markdown files, copied into docs/ at build time by conf.py so the GitHub-rendered copies stay canonical and their relative links keep working on the site; the API reference is one automodule page per module, rendering the Sage-convention docstrings as-is. A fifth CI job builds with -W --keep-going, and .readthedocs.yaml sets fail_on_warning to match, so a broken cross-reference or malformed docstring fails rather than degrading the site. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Versioning.md (from the versioning-policy branch, merged here so this builds standalone in either merge order) is linked from the README, so the site must carry it: without the copy and the toctree entry the combined tree failed sphinx -W with myst.xref_missing on the README link. Its own links (QueryLanguage, Searching, DataManagement, MetadataFormats) all point at guides already on the site. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Review caught a cross-PR interaction with #123: it links Fixed by stacking: Verified: combined build fails without the wiring, succeeds with it ( |
Nothing on the site links to them yet, so this is not fixing a build break -- it is preventing the next one: the moment a copied guide gains a "see CONTRIBUTING.md" line, sphinx -W fails with myst.xref_missing exactly as the README's Versioning.md link did. Beyond the tripwire, CONTRIBUTING.md was written around this site (its Documentation section gives the sphinx -W build command) and links SECURITY.md plus all four spec guides, so on the site those links now go live. They sit under their own Project caption rather than among the user guides. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Follow-up: main also gained CONTRIBUTING.md and SECURITY.md, so they're now carried on the site too (own "Project" toctree caption). CONTRIBUTING.md links SECURITY.md + all four spec guides — all resolve on-site — and its Documentation section already documents this PR's |
The defaults key list from #119 and the warnings-as-errors docs build from #122 first met when both merged: a nested bullet list needs blank lines around it in reST, so the docs job (and the Read the Docs build) failed on main with 'Unexpected indentation'. Two blank lines fix it, and the key list now renders as an actual nested list. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rebased onto main, which absorbed everything this PR used to anticipate; the reconciliation: - Version: 1.0.0 is now set in psycodict.__init__.__version__, the single source of truth roed314#121 established -- pyproject keeps main's dynamic version, SPDX license string and >=3.9 floor, and this PR's classifiers drop the License:: entry (setuptools >= 77 rejects it next to an SPDX string) and the 3.8 entry. - README: the rewrite now carries the Versioning.md pointer (roed314#123) in its Documentation list, which switches to relative links -- on the Sphinx site (roed314#122) those resolve to the copied guide pages, and they still render on GitHub; CHANGELOG and LICENSE stay absolute since neither is on the site. Supported Python is 3.9+; blob/master URLs become blob/main. - CHANGELOG: entries for the late wave -- sum/random honoring saving (roed314#118) and the 3.9 floor (roed314#121) under breaking changes; the docs site (roed314#122), Versioning.md/CONTRIBUTING/SECURITY and __version__ (roed314#121) under added; reload metafile+resort (roed314#114), update_from_file stats publication (roed314#115), copy_dumps delimiter escaping (roed314#116) under fixed; config.ini untracking (roed314#120), this release workflow and CITATION.cff (roed314#124) under infrastructure. - release.yml: the flow notes now say bump __init__.__version__ and merge to main. - Fixes the docs build on main, broken by the roed314#119 x roed314#122 crossing (roed314#119 merged after roed314#122's last CI run): the Configuration docstring's nested defaults list needed blank lines to be valid RST under autodoc, and the README's relative LICENSE link had no target on the site. Suite 857 passed / 36 skipped; ruff clean; sphinx -W clean; python -m build + twine check --strict pass with Version 1.0.0, License-Expression GPL-2.0-or-later, Requires-Python >=3.9 and no License classifier in the wheel metadata. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A documentation site for psycodict: Sphinx + MyST-Parser + autodoc, furo theme, served on Read the Docs, with the build wired into CI so it can never silently rot.
Structure. The narrative guides are the existing root-level Markdown files — README (as "Getting started"), QueryLanguage, Searching, DataManagement, MetadataFormats — which
docs/conf.pycopies intodocs/at build time. That keeps the GitHub-rendered copies canonical (no duplication, no moved files, no broken deep links) while their relative links to one another turn into working site links. The API reference is oneautomodulepage per module (all eleven), plus a hand-written map of how the pieces fit; the Sage-convention docstrings (INPUT:/OUTPUT:blocks,EXAMPLES::transcripts,:meth:/:class:roles) are plain reST and render as-is. GitHub-style heading anchors are enabled so the guides' intra-page#linkskeep working; intersphinx links Python and psycopg references.The build contract. A fifth CI job (
docs, ~40s, no database — importing psycodict doesn't connect) runssphinx-build -W --keep-going, and.readthedocs.yamlsetsfail_on_warningto match: a broken cross-reference or malformed docstring fails the build rather than degrading the site. Getting to zero warnings surfaced eight real glitches, fixed in the first commit: over-/staircase-indented bullet continuations in thesearch/luckyINPUT blocks (docutils parses those as stray block quotes), an unterminated``LISTEN``edinline literal inNotificationListener, missing H1 titles in QueryLanguage.md and DataManagement.md (GitHub renders those better now too), and a Searching.md TOC link pointing at a raw<a name>anchor Markdown processors don't index (the anchor stays, so old deep links still work).Build locally with:
One manual step to go live: import the repository at https://about.readthedocs.com (dashboard → Import a Project). From then on the RTD GitHub app builds every push and gives pull-request preview builds; once 1.0 is tagged, activate the tag under Versions so
/stable/serves the release while/latest/tracks master.Deliberately left to #113 (to avoid conflicts with the release capstone, which owns README and pyproject): adding
Documentation = "https://psycodict.readthedocs.io"to[project.urls]and a docs badge to the README — one line each.Future work (noted, not attempted here): the
EXAMPLES::blocks usesage:prompts and several still sayfrom lmfdb import db— relics of the extraction, so they're illustrative rather than runnable. Rewriting them to>>>with psycodict-only setup would let them run as real doctests against the CI PostgreSQL service.Verified: local build passes with zero warnings;
ruff check .clean (conf.py included); built HTML spot-checked — furo assets, guide cross-links resolved to.html, the search/lucky parameter lists render as proper bullets, the notifications Forking/Hot standbys sections and the#parametersanchor all present.🤖 Generated with Claude Code