Skip to content

docs: modernize Sphinx config and fix broken cross-references - #74

Merged
jedymatt merged 1 commit into
mainfrom
worktree-docs+latest-conventions
Jul 7, 2026
Merged

docs: modernize Sphinx config and fix broken cross-references#74
jedymatt merged 1 commit into
mainfrom
worktree-docs+latest-conventions

Conversation

@jedymatt

@jedymatt jedymatt commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

Brings the Sphinx docs build up to current conventions and repairs cross-references that were silently rendering as dead text (Sphinx doesn't warn about unresolved refs outside nitpicky mode).

docs/conf.py

  • Enable sphinx.ext.intersphinx with python + sqlalchemy (2.0) mappings — the async docs already used :class:~sqlalchemy.ext.asyncio.AsyncSession`` and similar refs that linked nowhere. They now link to the real upstream docs.
  • Remove the legacy sys.path.insert(os.path.abspath('.')) hack (AutoAPI reads ../src statically; nothing to import).
  • Remove unused sphinx.ext.autodoc (AutoAPI is standalone).
  • Fold extensions.append('autoapi.extension') into the extensions list.
  • Auto-update the copyright year instead of freezing it at 2022.
  • Prune AutoAPI options that only restated defaults, keeping autoapi_root='api' (its default is autoapi, so dropping it would move the published API URLs and break inbound links).
  • Reorganize into standard commented sections.

Other

  • docs/requirements.txt: bump the Sphinx floor >=4.3>=8.0.
  • docs/async.rst: fix 3 broken :class:/:meth: cross-references (AutoAPI registers classes at their source-module path, e.g. sqlalchemyseed.seeder.Seeder).
  • src/sqlalchemyseed/aio.py: fix the one broken :meth: ref in the module docstring (rendered by AutoAPI).
  • docs/_static/.gitkeep: added — removes the only warning in the original build (html_static_path entry '_static' does not exist).

Verification

Built with sphinx -b html -n -W (nitpicky + warnings-as-errors): exit 0 — every cross-reference resolves. Confirmed the rendered HTML emits real links: AsyncSession/run_syncdocs.sqlalchemy.org/en/20/…, and Seeder → the internal API page.

No pyproject.toml/lockfile changes; runtime behavior is unchanged (the only src/ edit is a docstring).

🤖 Generated with Claude Code

Bring the docs build up to current Sphinx conventions and repair
cross-references that were silently rendering as dead text.

conf.py:
- Enable sphinx.ext.intersphinx with python + sqlalchemy (2.0) mappings
  so :class:`~sqlalchemy...` references resolve to upstream docs.
- Drop the legacy sys.path.insert hack (AutoAPI reads ../src statically).
- Remove unused sphinx.ext.autodoc (AutoAPI is standalone).
- Fold the extensions.append('autoapi.extension') into the extensions list.
- Auto-update the copyright year instead of freezing it at 2022.
- Prune AutoAPI options that only restated defaults; keep autoapi_root='api'
  to preserve the published API URLs.

Also:
- Bump docs sphinx floor to >=8.0.
- Fix broken :class:/:meth: cross-references in async.rst and the aio.py
  module docstring (AutoAPI registers classes at their source module path).
- Add docs/_static/.gitkeep to silence the missing-static-path warning.

Verified with `sphinx -b html -n -W` (nitpicky, warnings-as-errors): exit 0,
every cross-reference resolves.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jedymatt
jedymatt merged commit 26f70cb into main Jul 7, 2026
16 checks passed
@jedymatt
jedymatt deleted the worktree-docs+latest-conventions branch July 7, 2026 01:50
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