shinx build#166
Merged
Merged
Conversation
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.
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.
No description provided.