Skip to content

feat(docs): use consistent ordering when generating docs#18893

Merged
nijel merged 1 commit intoWeblateOrg:mainfrom
nijel:generate-docs
Apr 11, 2026
Merged

feat(docs): use consistent ordering when generating docs#18893
nijel merged 1 commit intoWeblateOrg:mainfrom
nijel:generate-docs

Conversation

@nijel
Copy link
Copy Markdown
Member

@nijel nijel commented Apr 10, 2026

  • Use consistent ordering so that the content doesn't appear in random order when added.
  • Update contributor documentation to match the current flow.
  • Split add-ons docs to make it easier to generate.

Fixes #18724

@nijel nijel added this to the 5.17 milestone Apr 10, 2026
@nijel nijel requested review from Copilot and gersona April 10, 2026 07:22
@nijel nijel self-assigned this Apr 10, 2026
@nijel nijel requested a review from AliceVisek as a code owner April 10, 2026 07:22
Copy link
Copy Markdown
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

This PR improves determinism and contributor workflow around Weblate’s autogenerated documentation snippets by enforcing consistent section ordering, adding support for splitting list_addons output into separate snippet files, and updating contributor/admin docs accordingly (Fixes #18724).

Changes:

  • Refactors DocGeneratorCommand to merge/reorder existing autogenerated sections deterministically while preserving per-section manual “tails”.
  • Extends list_addons with --sections filtering and updates tests to validate split outputs.
  • Splits add-ons documentation snippets into events/add-ons/parameters files and updates the docs build workflow/docs pages.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
weblate/utils/tests/test_commands.py Adds unit tests validating deterministic merge/reorder behavior for doc generator output files.
weblate/utils/management/base.py Implements marker prefix constants and new merge/reorder logic for autogenerated doc sections.
weblate/addons/tests.py Adds coverage for list_addons --sections split output and verifies parameter heading presence.
weblate/addons/management/commands/list_addons.py Adds --sections filtering and orders shared parameter docs consistently.
docs/snippets/addons-autogenerated.rst Updates generated add-ons snippet to contain only built-in add-ons content (no events/params).
docs/snippets/addon-parameters-autogenerated.rst New generated snippet for common add-on parameters.
docs/snippets/addon-events-autogenerated.rst New generated snippet for add-on events.
docs/Makefile Updates update-docs to generate the three add-ons snippet files separately.
docs/contributing/documentation.rst Updates contributor workflow to use make -C docs update-docs and clarifies what is autogenerated.
docs/changes.rst Notes the contributor documentation workflow update in the 5.17 changelog.
docs/admin/management.rst Documents the new list_addons --sections option.
docs/admin/addons.rst Rewires the add-ons admin doc page to include the new split snippet files and restores obsolete add-ons as manual text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread weblate/utils/management/base.py Outdated
Comment thread weblate/utils/management/base.py
Comment thread weblate/utils/management/base.py Outdated
Copy link
Copy Markdown
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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread weblate/utils/management/base.py
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b6e335cfd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread weblate/checks/management/commands/list_checks.py Outdated
@argos-ci
Copy link
Copy Markdown

argos-ci Bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 17 changed Apr 11, 2026, 11:16 AM

- Use consistent ordering so that the content doesn't appear in random
  order when added.
- Update contributor documentation to match the current flow.
- Split add-ons docs to make it easier to generate.

Fixes WeblateOrg#18724
@nijel nijel enabled auto-merge (rebase) April 11, 2026 10:19
@nijel nijel merged commit b3e8b85 into WeblateOrg:main Apr 11, 2026
48 of 49 checks passed
@nijel nijel deleted the generate-docs branch April 11, 2026 11:28
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.

Outdated documentation on generated documentation

2 participants