Repository navigation
3di | Enhance metadata (backport #6981) - #7252
Conversation
* OPENR-155: Adding IA content to first few sample articles * OPENR-155: Complete first pass of IA updates for Nodes articles * OPENR-155: Fix whitespace typo * OPEN-155: Add missing IA elements to Composition * apply ai elements to tools section * OPENR-174: Check and update product and distribution metas, and suggest them as changes * apply ai elements to tools section * OPENR-174: Improved handling and use suggestions when possible * OPENR-174: Review comment obsolete status, and only insert new meta block at top of the file * OPENR-155: Adding IA elements to framework topics * OPENR-155: Adding IA elements * apply ai elements to tools section * apply ai elements to tools section * OPENR-155: Adding more IA elements * apply ai elements to tools section * apply ai elements to tools section * apply ai elements to tools section * apply ai elements to tools section * OPENR-155: Adding more IA elements to articles * apply ai elements to tools section * OPENR-155: Fix whitespace errors from linter * apply ia elements to community section * update experience level in tools section * OPENR-155: IA elements added * OPENR-155: Final IA elements added * OPENR-174: Add warning line to file for missing meta, and soft fail step in workflow * OPENR-174: Allow for generic config of metas, including different severities and blank/prepopuldated values * OPENR-174: Refactoring and cleanup * OPENR-154: Add titles, metadata, and short descriptions for Get-Started Align Get-Started installation and release articles with the content model: gerund titles with content types where applicable, meta/showmeta blocks, ToC depth 2, and short descriptions. Co-authored-by: Cursor <[email protected]> * OPENR-154: Fix include fragments and blank lines after titles Co-authored-by: Cursor <[email protected]> * OPENR-174: Some refactoring and tidy up to use Makefile * OPENR-174: Move more into makefile and supporting sh script to keep workflow relatively clean * Temporary update to gitignore * OPENR-174: Update PHONY list to ensure catch-all doesn't try to remake * Add metadata and improve titles * Add placeholders for shortdesc * Add short descs for tutorials/how-tos/learning-paths * Add short descriptions to the about articles * Add tables of contents and improvements * OPENR-174: Improve annotations to include static fields * OPENR-174: Further clarification on review comment in PR for suggestions/manual * OPENR-174: Fix workflow issues found in testing * OPENR-154: Update with new responses, fix ToCs for release notes * Add metadata as per queries * Add information architecture elements to topics * Revert "Temporary update to gitignore" This reverts commit c00c9a1. * Lint fixes * OPENR-174: No longer supersede the suggestion reviews, only summaries. * OPENR-174: Improve review comments with headers and for clarity * update area in tools section * OPENR-174: Add short description and showmeta directives * OPENR-174: First pass at short-description and showmeta suggestions or comments * OPENR-174: Revert test changes to First steps article. * apply ia elements to community section * update type and area in tools section * OPENR-174: Renaming throughout to reflect enhancement instead of just metadata * OPENR-174: Make enhance config file more consistent * OPENR-174: Fix annotation and short desc formatting bugs * OPENR-174: Updates to README * apply ia elements to community section * OPENR-154 Improve short descs * OPENR-157: Add IA elements to topics * OPENR-157: Add IA elements to last couple of article * apply peer review edits to tools section * OPENR-174: Remove suggestions and annotations from enhance * OPENR-174: Clean up python modules * docs: expand tools README contributor guide for Enhance workflow Clarify PR-scoped checks, default-branch workflow behaviour, and how contributors receive and resolve review feedback. * Add metadata to migrating from ros1 articles * Fix showmeta import so Sphinx can load the plugin * Fix cross compilation redirects * Fix About-ROS and Releases redirects * Fix syntax in topics causing further errors * Fix to pass lint * Fix redirects * Add allowed metadata values to the enhance checker * add metadata to articles * add metadata to articles * Update glossary * add metadata to source control best practices * Add exclude for _internal and snippets to the checker * Add missing metadata * Fix build issues * Further fix * Update source/Developer-Tools/About-Build.rst Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: 3di Information Solutions <[email protected]> * Update source/Developer-Tools/About-Launch.rst Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: 3di Information Solutions <[email protected]> * Update source/Developer-Tools/About-visualization.rst Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: 3di Information Solutions <[email protected]> * Update source/ROS-Framework/client-libraries/Working-with-Client-Libraries/Single-Package-Define-And-Use-Interface.rst Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: 3di Information Solutions <[email protected]> * Update source/ROS-Framework/nodes/Working-with-nodes/Understanding-ROS2-Nodes/Understanding-ROS2-Nodes.rst Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: 3di Information Solutions <[email protected]> * Update source/Developer-Tools/Introspection-and-analysis/Service-Introspection.rst Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: 3di Information Solutions <[email protected]> * Update source/ROS-Framework/nodes/Working-with-nodes/Understanding-ROS2-Nodes/Understanding-ROS2-Nodes.rst Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: 3di Information Solutions <[email protected]> * Update source/Developer-Tools/About-package-documentation.rst Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: 3di Information Solutions <[email protected]> * Update tools/enhance.yaml Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: 3di Information Solutions <[email protected]> * Update source/The-ROS2-Project/Contributing/Documentation/Documentation-guidelines.rst Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: 3di Information Solutions <[email protected]> * Update source/Developer-Tools/Introspection-and-analysis/Security/About-Security.rst Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: 3di Information Solutions <[email protected]> * Update source/Developer-Tools/Introspection-and-analysis/Security/Introducing-ros2-security.rst Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: 3di Information Solutions <[email protected]> * Remove trailing whitespace * Correct title of first steps article * Correct reference path Signed-off-by: Geoffrey Biggs <[email protected]> --------- Signed-off-by: 3di Information Solutions <[email protected]> Signed-off-by: Geoffrey Biggs <[email protected]> Co-authored-by: Denise Marshall <[email protected]> Co-authored-by: sarahfarnborough-3di <[email protected]> Co-authored-by: Agata R. 3di <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: 3di Information Solutions <[email protected]> Co-authored-by: Kacper Bojakowski <[email protected]> Co-authored-by: Alejandro Hernández Cordero <[email protected]> Co-authored-by: Geoffrey Biggs <[email protected]> (cherry picked from commit dfb668f) # Conflicts: # source/The-ROS2-Project/Contributing/Contributing-to-documentation.rst # source/The-ROS2-Project/Contributing/Documentation/Creating-or-updating-documentation.rst # source/The-ROS2-Project/Contributing/Documentation/Documentation-guidelines.rst
|
Cherry-pick of dfb668f has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
The original commit (dfb668f) on rolling added metadata to three pages created by the OPENR-144 Contributing refactor: source/The-ROS2-Project/Contributing/Contributing-to-documentation.rst source/The-ROS2-Project/Contributing/Documentation/Creating-or-updating-documentation.rst source/The-ROS2-Project/Contributing/Documentation/Documentation-guidelines.rst That refactor was never backported to lyrical, which still has the original single Contributing-To-ROS-2-Documentation.rst page. The cherry-pick therefore conflicted ("deleted by us") and Mergify resolved it by adding the full rolling versions of the files. On lyrical those pages are orphans: not in any toctree, their images are missing, and they reference an undefined label, which fails the -W Sphinx build. Remove the three pages so the backport only touches files that exist on lyrical. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Conflict resolutionWhy the cherry-pick conflicted The original commit dfb668f (#6981) on
That refactor was never backported to What was done
Verified locally on the resulting tree: Note on the 🤖 Generated with Claude Code |
|
To view the resulting site:
|
i think what we really should do is to backport #6966 and rollback the fixes that Claude just made. |
) pull_request_target workflows are evaluated from the default branch, so the workflow added in #6981 also runs for backport pull requests against the distro branches (e.g. #7252, #7266). Those branches do not have the ensure-enhancements Makefile target, so the catch-all rule fails with "No module named sphinx" and the check is red. Restrict the trigger to the rolling base branch, which is what #6981 intended. Co-authored-by: Claude Fable 5.1 <[email protected]>
…rical" This reverts commit fc19c4e.
…/pr-6981 # Conflicts: # source/The-ROS2-Project/Contributing/Contributing-to-documentation.rst # source/The-ROS2-Project/Contributing/Documentation/Creating-or-updating-documentation.rst # source/The-ROS2-Project/Contributing/Documentation/Documentation-guidelines.rst
|
Do not merge this yet, this includes unnesessary |
…umentation into mergify/bp/lyrical/pr-6981
|
Now that #7266 has backported #6966 to
The three pages are otherwise byte-identical to Note: with #7267 on 🤖 Generated with Claude Code |
|
@ahcorde now it is ready to review and merge, the conflicts we saw before is gone, and the change is now consistent with rolling one. |
Description
This PR introduces the mechanism and configuration for automated RST documentation enhancement checks required to support the new ROS documentation information architecture. All RST files created or modified in a pull request to the default branch (rolling) on
ros2_documentationare checked against rules defined intools/enhance.yaml:Document metadata
{PRODUCT}and{DISTRO}) or require the contributor to supply a non-empty value (e.g.area).Post-heading directives
.. short-description::Checks that the first prose paragraph after the primary document title is wrapped in a .. short-description:: directive... showmeta::Checks that a .. showmeta:: directive exists after the title area with the configured options (e.g. :order: area, content-type, experience).Pull request feedback
When enhancements are missing, the Enhance workflow posts a single Documentation enhancements summary review comment on the pull request. For each affected file, the comment lists:
.. meta::fields (labelled required or optional, with suggested values where configured), andThe tool is read-only: it does not modify RST files, emit inline commit suggestions, or post check annotations.
On subsequent workflow runs in the same PR, stale summary reviews are automatically minimised as Outdated and replaced with an updated summary if enhancements are still missing. When all issues are resolved, outdated reviews are cleared and no new comment is posted.
Testing
For security reasons, the new
Enhanceworkflow runs trusted code from the base branch of the PR (typicallyrolling), while processing content from the incoming head branch. This pattern (usingpull_request_targetin GitHub Actions) grants necessary write permissions for fork PRs (enabling inline suggestions and review comments) without executing untrusted code from forks.To test this PR locally or on a fork:
rolling) of your fork first.rollingwith new or edited.rstfiles.Changes
tools/enhance.yamlconfiguration for meta field rules and after_title directive rules (.. short-description::,.. showmeta::), with per-rule warning / error severity and suggested default values where applicable.tools/enhance_config.pyto load and validate enhancement rules from YAML.tools/ensure_enhancements.pyCLI to check changed RST files against the config, generate Documentation enhancements summary review comments, and emit GitHub Actions status outputs for CI. The tool is read-only and does not modify source files.tools/rst_utils.pyread-only helpers to detect.. meta::fields and the presence of.. short-description::/.. showmeta::directives.tools/supersede_enhancement_reviews.shto minimise outdated summary review comments via the GitHub GraphQL API..github/workflows/enhance.ymlworkflow to run enhancement checks on pull requests, supersede stale reviews, post summary review comments, and fail the job when error-severity rules are unmet.Makefilewith ensure-enhancements and supersede-enhancement-reviews targets, and extend test-tools to run the tools/tests/ unit suite (viaPYTHONPATH).tools/tests/test_ensure_enhancements.pyandtools/tests/test_rst_utils.py.tools/README.md.{PRODUCT}and{DISTRO}macro placeholders expanded by Sphinx inconf.py.Did you use Generative AI?
Yes - Cursor IDE, using models Composer 2.5, Gemini Pro 3.1, Flash 3.6, and Anthropic Sonnet 5 / Opus 5.
Additional Information
Issue: #6991
This is an automatic backport of pull request #6981 done by Mergify.