Skip to content

shinx build#166

Merged
magnesj merged 4 commits into
next-major-releasefrom
use-sphinx-build
May 22, 2026
Merged

shinx build#166
magnesj merged 4 commits into
next-major-releasefrom
use-sphinx-build

Conversation

@magnesj
Copy link
Copy Markdown
Member

@magnesj magnesj commented May 22, 2026

No description provided.

magnesj added 4 commits May 22, 2026 07:56
The .proto parser in generate_protobuf_docs.py silently dropped two
constructs:

- map<K, V> fields were missed by the field regex. Added a dedicated
  map matcher; the generator renders them as dict[K, V]. This restores
  the PdmObject.parameters field.
- /* ... */ block comments were ignored (only // was handled), so the
  Commands service and the CommandParams/CommandReply messages had no
  description. Comment extraction now buffers block comments too.

Regenerate ProtobufStructures.rst to pick up the recovered field and
descriptions.
Add *.pyi to docs/.gitignore so generated type stub files alongside the
rips package are not tracked.
The class/enum index, protobuf reference and Python example pages were
generated by separate steps in the update-from-latest workflow (and
generate_class_index.py was not wired in at all), so they drifted out of
sync whenever the rips package or .proto files changed.

Run the generators from conf.py instead, on the builder-inited event, so
every build - local and Read the Docs - regenerates from the current
docs/rips and docs/proto:

- conf.py: run_doc_generators invokes generate_class_index.py,
  generate_protobuf_docs.py and create_python_examples.py before sources
  are read (priority 100, ahead of autosummary stub generation).
- Stop tracking the generated RST (GeneratedClasses, EnumClasses,
  ProtobufStructures, PythonExamples*, api_categories/); they are build
  artifacts now and are gitignored.
- update-from-latest.yml: drop the two generation steps; the workflow
  now only ships the updated rips package and .proto files.
The generators were hooked on builder-inited, but Sphinx snapshots the
source file list (env.found_docs) in _post_init_env/find_files, which
runs before any builder-inited handler. autosummary's stub generation
iterates that snapshot.

On a fresh checkout the api_categories/*.rst files do not exist yet
(they are gitignored), so the snapshot was taken before run_doc_generators
created them. autosummary then generated no per-class stub pages and the
class leaf nodes were missing from the navigation - seen on Read the Docs,
which always builds from a clean clone.

Move run_doc_generators to config-inited, which fires before find_files,
so the generated files are on disk before Sphinx scans the source tree.
@magnesj magnesj merged commit 3717587 into next-major-release May 22, 2026
4 checks passed
@magnesj magnesj deleted the use-sphinx-build branch May 22, 2026 08:07
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