Skip to content

📝 Fix near-empty API docs on Read the Docs - #623

Merged
MiWeiss merged 2 commits into
mainfrom
fix/469-empty-api-docs
Sep 10, 2026
Merged

📝 Fix near-empty API docs on Read the Docs#623
MiWeiss merged 2 commits into
mainfrom
fix/469-empty-api-docs

Conversation

@MiWeiss

@MiWeiss MiWeiss commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Fixes #469.

The published v2.0.0 API page lists 39 signatures, all bibtexparser.model.* — no parse_string, no Library, no BibtexFormat, no middlewares — and customize.rst's cross-references resolve to nothing.

Cause 1: .readthedocs.yaml never installed the package, so autodoc failed to import bibtexparser (missing pylatexenc). The commented-out stub pointed at a docs/requirements.txt that doesn't exist, so uncommenting it as-is would have failed the build. Now installs .[docs].

Cause 2: persists even after Cause 1 is fixed — bibtexparser/middlewares/__init__.py only re-exports, and autodoc skips imported members unless __all__ names them. Added __all__.

Also two blank lines in entrypoint.py: the large-library note from #615 was glued onto the :param: field list and rendered as part of the last parameter. Only visible once autodoc could import the module.

before after
Signatures 39 116
Middleware classes 0 22
Cross-links from customize 0 27

Sphinx builds clean under -W. Tests: 2777 passed, 12 skipped.

🤖 Generated with Claude Code

MiWeiss and others added 2 commits September 10, 2026 22:02
Read the Docs never installed the package, so autodoc could not import
`bibtexparser` (pylatexenc missing) and every directive outside
`bibtexparser.model` failed. The published API page listed 39 signatures,
all `model.*` -- no parse_string, no Library, no BibtexFormat, no
middlewares -- and customize.rst's cross-references resolved to nothing.

- .readthedocs.yaml: install the package with its `docs` extra. The
  commented-out stub pointed at a docs/requirements.txt that does not
  exist, so uncommenting it as-is would have failed the build.
- middlewares/__init__.py: add `__all__`. The module only re-exports, and
  autodoc skips imported members unless `__all__` names them.
- entrypoint.py: blank line before the large-library note in
  write_file/write_string, which was glued onto the `:param:` field list
  and rendered as part of the last parameter.

Sphinx now builds clean under -W: 116 signatures, 22 middleware classes,
27 resolved cross-references.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@MiWeiss
MiWeiss merged commit 54ef8d1 into main Sep 10, 2026
18 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.

docs: links to code not working

1 participant