Skip to content

Automatic documentation generation#18152

Open
gersona wants to merge 14 commits intoWeblateOrg:mainfrom
gersona:17761_auto_update_documentation,
Open

Automatic documentation generation#18152
gersona wants to merge 14 commits intoWeblateOrg:mainfrom
gersona:17761_auto_update_documentation,

Conversation

@gersona
Copy link
Contributor

@gersona gersona commented Feb 21, 2026

The approach is to use markers in the target document in order to combine automatically generated content (within the markers) and custom/handwritten content.
This has is drawbacks, but it allows to keep a minimal number of files to maintain, and reduces mix of concern between documentation code and actual logic code.

@gersona
Copy link
Contributor Author

gersona commented Feb 21, 2026

@nijel, can you share your thoughts on this approach for automating documentation generation ?

@codecov
Copy link

codecov bot commented Feb 21, 2026

Codecov Report

❌ Patch coverage is 83.51648% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.00%. Comparing base (7e2c4f8) to head (dc20e72).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
weblate/addons/management/commands/list_addons.py 72.22% 12 Missing and 3 partials ⚠️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@nijel nijel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a reasonable approach. See a few comments I've made on the implementation. I will also trigger copilot review to comment on this.

@nijel nijel requested a review from Copilot February 23, 2026 10:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds scaffolding for automatic documentation generation by introducing version metadata markers for add-ons and updating the list_addons management command to emit/insert auto-generated RST blocks.

Changes:

  • Introduced RST “versionadded/versionchanged” metadata helper classes and attached version metadata to various add-ons.
  • Extended ./manage.py list_addons to write generated docs either to stdout or into a file section delimited by markers.
  • Added human-readable descriptions for add-on events to improve generated documentation.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
weblate/utils/docs.py Adds RST version metadata helpers for embedding versionadded/versionchanged directives.
weblate/addons/base.py Introduces doc_versions on add-on base class for documentation metadata.
weblate/addons/webhooks.py Adds doc_versions metadata to webhook add-ons.
weblate/addons/gettext.py Updates add-on description formatting and adds versionchanged metadata.
weblate/addons/generate.py Adds versionadded metadata for locale-generation add-ons.
weblate/addons/fedora_messaging.py Adds versionadded metadata for Fedora Messaging add-on.
weblate/addons/cleanup.py Adds versionadded metadata for Remove Blank add-on.
weblate/addons/cdn.py Adds versionadded metadata for CDNJS add-on.
weblate/addons/events.py Adds event description strings used in generated docs.
weblate/addons/management/commands/list_addons.py Adds marker-based insertion into an output file and restructures doc generation output.

@gersona gersona force-pushed the 17761_auto_update_documentation, branch from f315457 to 52ada99 Compare March 12, 2026 06:17
@gersona gersona marked this pull request as ready for review March 12, 2026 08:40
@gersona gersona requested a review from AliceVisek as a code owner March 12, 2026 08:40
@gersona gersona changed the title WIP: Automatic documentation generation Automatic documentation generation Mar 16, 2026
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.

Automate documentation updates (add-ons, machinery, checks)

3 participants