Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ“ Integrate sphinxcontrib-towncrier #9569

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions .readthedocs.yaml
Expand Up @@ -14,6 +14,3 @@ build:
os: ubuntu-22.04
tools:
python: "3.11"
jobs:
pre_build:
- towncrier build --yes --date TBA
22 changes: 22 additions & 0 deletions doc/conf.py
Expand Up @@ -7,6 +7,7 @@
import os
import sys
from datetime import datetime
from pathlib import Path

# Pylint documentation build configuration file, created by
# sphinx-quickstart on Thu Apr 4 20:31:25 2013.
Expand All @@ -32,6 +33,18 @@

# pylint: enable=wrong-import-position

# -- Path setup --------------------------------------------------------------

PROJECT_ROOT_DIR = Path(__file__).parents[1].resolve()
IS_RELEASE_ON_RTD = (
os.getenv("READTHEDOCS", "False") == "True"
and os.environ["READTHEDOCS_VERSION_TYPE"] == "tag"
)
if IS_RELEASE_ON_RTD:
tags: set[str]
# pylint: disable-next=used-before-assignment
tags.add("is_release") # noqa: F821

# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand All @@ -47,6 +60,7 @@
"sphinx.ext.autosectionlabel",
"sphinx.ext.intersphinx",
"sphinx_reredirects",
"sphinxcontrib.towncrier.ext",
]


Expand Down Expand Up @@ -305,3 +319,11 @@
linkcheck_ignore = [
"https://github.com/pylint-dev/pylint/blob/main/pylint/extensions/.*"
]

# -- Options for towncrier_draft extension -----------------------------------

# or: 'sphinx-version', 'sphinx-release'
towncrier_draft_autoversion_mode = "draft"
towncrier_draft_include_empty = True
towncrier_draft_working_directory = PROJECT_ROOT_DIR
towncrier_draft_config_path = "towncrier.toml" # relative to cwd
2 changes: 1 addition & 1 deletion doc/requirements.txt
@@ -1,5 +1,5 @@
Sphinx==7.2.6
sphinx-reredirects<1
towncrier~=23.11
sphinxcontrib-towncrier ~= 0.4.0a0
furo==2024.1.29
-e .
16 changes: 15 additions & 1 deletion doc/whatsnew/3/3.2/index.rst
Expand Up @@ -13,4 +13,18 @@ Summary -- Release highlights
=============================


.. towncrier release notes start
.. only:: not is_release

*To be included in the next release*
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. towncrier-draft-entries:: |release| :sub:`/UNRELEASED DRAFT/`

Released versions
^^^^^^^^^^^^^^^^^

.. towncrier release notes start

.. only:: is_release

.. towncrier release notes start