From 57ada5607ff870b7411db04134ba5815f3e703e5 Mon Sep 17 00:00:00 2001 From: Sashank Bhamidi Date: Sat, 28 Nov 2026 11:13:44 +0530 Subject: [PATCH] docs: check the change log before a release, and update links that redirect --- Makefile | 4 +++- README.md | 4 ++-- docs/_templates/rtd-pr-previews.html | 2 +- docs/conf.py | 2 +- docs/contribute.rst | 2 +- docs/release.rst | 13 +++++++++++-- 6 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index aebfebb..77562c7 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,9 @@ SPHINX_APIDOC_OPTIONS = ignore-module-all,members,show-inheritance TESTS = src/calendaring_sync/tests INTEGRATION = $(TESTS)/test_caldav_integration.py $(TESTS)/test_jmap_integration.py FIXTURES = stalwart cyrus baikal -VALEFILES := $(shell find $(DOCS_DIR) -type f -name "*.rst" -print) +# The news fragments too, so a fragment's wording is checked in its own pull +# request rather than first in the change log a release builds. +VALEFILES := $(shell find $(DOCS_DIR) news/ -type f -name "*.rst" -print) VALEOPTS ?= .PHONY: help diff --git a/README.md b/README.md index eb5194d..3687c04 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ Calendar sync state: sync tokens, object versions, change tracking, and conflict Part of the [Python Calendaring Ecosystem](https://pycal.org). -[![Documentation](https://readthedocs.org/projects/calendaring-sync/badge/?version=stable)](https://calendaring-sync.readthedocs.io/en/stable/) +[![Documentation](https://app.readthedocs.org/projects/calendaring-sync/badge/?version=stable)](https://calendaring-sync.readthedocs.io/en/stable/) [![Tests](https://github.com/PyCalendar/calendaring-sync/actions/workflows/tests.yml/badge.svg)](https://github.com/PyCalendar/calendaring-sync/actions/workflows/tests.yml) -[![codecov](https://codecov.io/gh/PyCalendar/calendaring-sync/branch/main/graph/badge.svg)](https://codecov.io/gh/PyCalendar/calendaring-sync) +[![codecov](https://codecov.io/gh/PyCalendar/calendaring-sync/branch/main/graph/badge.svg)](https://app.codecov.io/gh/PyCalendar/calendaring-sync) [![REUSE status](https://api.reuse.software/badge/github.com/PyCalendar/calendaring-sync)](https://api.reuse.software/info/github.com/PyCalendar/calendaring-sync) [![License: AGPL-3.0-or-later](https://img.shields.io/badge/License-AGPL%203.0--or--later-blue.svg)](https://github.com/PyCalendar/calendaring-sync/blob/main/LICENSE) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) diff --git a/docs/_templates/rtd-pr-previews.html b/docs/_templates/rtd-pr-previews.html index 1a0781e..065800d 100644 --- a/docs/_templates/rtd-pr-previews.html +++ b/docs/_templates/rtd-pr-previews.html @@ -1,3 +1,3 @@ -

Pull request previews by Read the Docs.

+

Pull request previews by Read the Docs.

diff --git a/docs/conf.py b/docs/conf.py index 0bb2091..bee874f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -138,7 +138,7 @@ linkcheck_retries = 2 intersphinx_mapping = { - "python": ("https://docs.python.org/3", None), + "python": ("https://docs.python.org/3/", None), "caldav": ("https://caldav.readthedocs.io/stable/", None), "calendaring_jmap": ("https://calendaring-jmap.readthedocs.io/en/stable/", None), } diff --git a/docs/contribute.rst b/docs/contribute.rst index 556841d..68132d6 100644 --- a/docs/contribute.rst +++ b/docs/contribute.rst @@ -252,7 +252,7 @@ The ``docs`` group installs Vale, so run: make vale -It checks every page with the Microsoft style package, calendaring-sync's own rules in :file:`docs/styles/calendaring-sync/`, and the words in :file:`docs/styles/config/vocabularies/calendaring-sync/accept.txt`, which catch many of the rules above. CI fails on an error and shows warnings too, as ``make vale VALEOPTS="--minAlertLevel='warning'"`` does. To check one page, add ``VALEFILES="docs/index.rst"``. +It checks every page and every news fragment with the Microsoft style package, calendaring-sync's own rules in :file:`docs/styles/calendaring-sync/`, and the words in :file:`docs/styles/config/vocabularies/calendaring-sync/accept.txt`, which catch many of the rules above. CI fails on an error and shows warnings too, as ``make vale VALEOPTS="--minAlertLevel='warning'"`` does. To check one page, add ``VALEFILES="docs/index.rst"``. Where a page has to break a rule, such as a diagram's source or a sentence naming a word the rules forbid, turn that one rule off around it with ``.. vale RULE = NO`` and back on with ``.. vale RULE = YES``, or all of them with ``.. vale off`` and ``.. vale on``. diff --git a/docs/release.rst b/docs/release.rst index 2f348a2..5c23387 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -35,6 +35,15 @@ Cut a release This writes the new section into ``docs/changelog.rst`` and deletes the fragments it consumed. Review the diff: towncrier orders the entries in each category by issue number, not in the order the fragments were added. +#. Check the new section the way CI will, since an error in it fails the release's docs job: + + .. code-block:: bash + + make vale VALEOPTS="--minAlertLevel='warning'" + make html + + Fix any error in ``docs/changelog.rst`` itself before you commit. + #. Commit directly to ``main``, the one exception :ref:`commits-and-prs` makes to going through a pull request: the commit is mechanical, with nothing for a reviewer to review. .. code-block:: bash @@ -43,7 +52,7 @@ Cut a release git commit -m "chore: build 1.2.0 changelog" git push -#. Tag the commit you pushed, and push the tag: +#. Once CI is green on the commit you pushed, tag it and push the tag: .. code-block:: bash @@ -52,7 +61,7 @@ Cut a release Pushing the tag triggers the ``release`` GitHub Actions workflow: it runs the unit tests, the integration tests against every server, and the docs build, and only if all of them pass, builds the package, publishes to PyPI through trusted publishing, and creates a GitHub release that links this release's change log on Read the Docs. Nothing past the tag push is manual. -Read the Docs builds the new version from the same tag push. +Read the Docs builds the new version from the same tag push: an automation rule activates every tag that looks like a version, and ``stable`` follows the newest one. Dependency maintenance ======================