From e4e300750e88faab74a40b8b0a102ab91cae7754 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 17 Dec 2021 03:13:09 +0100 Subject: [PATCH] Integrate showing unreleased changelog draft --- CHANGELOG.md | 19 ++++++++++++++++--- docs/changelog.md | 19 +++++++++++++++++++ docs/conf.py | 12 ++++++++++++ docs/requirements.in | 1 + docs/requirements.txt | 29 +++++++++++++++++++++++++---- 5 files changed, 73 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e46ec51f00..7b552ed05d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,23 @@ - + # Changelog All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +[//]: # (DO-NOT-REMOVE-versioning-promise-START) + +```{note} +The change notes follow [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +except for the title formatting, and this project adheres to [Semantic +Versioning](https://semver.org/spec/v2.0.0.html). +``` + + diff --git a/docs/changelog.md b/docs/changelog.md index 975d25a5eb..34db4b6a0f 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,6 +1,25 @@ +# Changelog + ```{spelling} Changelog ``` ```{include} ../CHANGELOG.md +:end-before: +:start-after: (DO-NOT-REMOVE-versioning-promise-START) + +``` + + +## {{ release_l }}, as of {sub-ref}`today` _{subscript}`/UNRELEASED DRAFT/`_ + +```{important} This version is not yet released and is under active development +``` + +```{towncrier-draft-entries} +``` + +```{include} ../CHANGELOG.md +:start-after: + ``` diff --git a/docs/conf.py b/docs/conf.py index 7900e48be6..e71c4723a9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -53,6 +53,7 @@ rst_epilog = f""" .. |project| replace:: {project} +.. |release_l| replace:: ``v{release}`` """ @@ -100,6 +101,7 @@ # Third-party extensions: 'myst_parser', # extended markdown; https://pypi.org/project/myst-parser/ 'sphinxcontrib.apidoc', + 'sphinxcontrib.towncrier', # provides `towncrier-draft-entries` directive ] # Conditional third-party extensions: @@ -221,6 +223,13 @@ ] linkcheck_workers = 25 +# -- Options for towncrier_draft extension ----------------------------------- + +towncrier_draft_autoversion_mode = 'draft' # or: 'sphinx-version', 'sphinx-release' +towncrier_draft_include_empty = True +towncrier_draft_working_directory = PROJECT_ROOT_DIR +# Not yet supported: towncrier_draft_config_path = 'pyproject.toml' # relative to cwd + # -- Options for myst_parser extension ------------------------------------------ myst_enable_extensions = [ @@ -237,6 +246,9 @@ ] myst_substitutions = { 'project': project, + 'release': release, + 'release_l': f'`v{release}`', + 'version': version, } # -- Strict mode ------------------------------------------------------------- diff --git a/docs/requirements.in b/docs/requirements.in index 86acf774af..24f2e03abd 100644 --- a/docs/requirements.in +++ b/docs/requirements.in @@ -3,3 +3,4 @@ setuptools-scm >= 6.3.2 Sphinx >= 4.3.0 furo >= 2021.11.15 sphinxcontrib-apidoc >= 0.3.0 +sphinxcontrib-towncrier >= 0.2.0a0 diff --git a/docs/requirements.txt b/docs/requirements.txt index 811511c493..7b12d2f2f0 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -28,6 +28,13 @@ charset-normalizer==2.0.7 \ --hash=sha256:e019de665e2bcf9c2b64e2e5aa025fa991da8720daa3c1138cadd2fd1856aed0 \ --hash=sha256:f7af805c321bfa1ce6714c51f254e0d5bb5e5834039bc17db7ebe3a4cec9492b # via requests +click==8.0.3 \ + --hash=sha256:353f466495adaeb40b6b5f592f9f91cb22372351c84caeb068132442a4518ef3 \ + --hash=sha256:410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b + # via towncrier +click-default-group==1.2.2 \ + --hash=sha256:d9560e8e8dfa44b3562fbc9425042a0fd6d21956fcc2db0077f63f34253ab904 + # via towncrier docutils==0.17.1 \ --hash=sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125 \ --hash=sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61 @@ -46,12 +53,17 @@ imagesize==1.3.0 \ --hash=sha256:1db2f82529e53c3e929e8926a1fa9235aa82d0bd0c580359c67ec31b2fddaa8c \ --hash=sha256:cd1750d452385ca327479d45b64d9c7729ecf0b3969a58148298c77092261f9d # via sphinx +incremental==21.3.0 \ + --hash=sha256:02f5de5aff48f6b9f665d99d48bfc7ec03b6e3943210de7cfc88856d755d6f57 \ + --hash=sha256:92014aebc6a20b78a8084cdd5645eeaa7f74b8933f70fa3ada2cfbd1e3b54321 + # via towncrier jinja2==3.0.3 \ --hash=sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8 \ --hash=sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7 # via # myst-parser # sphinx + # towncrier linkify-it-py==1.0.2 \ --hash=sha256:4f416e72a41d9a00ecf1270ffb28b033318e458ac1144eb7c326563968a5dd24 \ --hash=sha256:6c37ef4fc3001b38bc2359ccb5dc7e54388ec5d54fe46d2dbcd9a081f90fdbe3 @@ -224,6 +236,7 @@ sphinx==4.3.1 \ # furo # myst-parser # sphinxcontrib-apidoc + # sphinxcontrib-towncrier sphinxcontrib-apidoc==0.3.0 \ --hash=sha256:6671a46b2c6c5b0dca3d8a147849d159065e50443df79614f921b42fbd15cb09 \ --hash=sha256:729bf592cf7b7dd57c4c05794f732dc026127275d785c2a5494521fdde773fb9 @@ -252,14 +265,22 @@ sphinxcontrib-serializinghtml==1.1.5 \ --hash=sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd \ --hash=sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952 # via sphinx +sphinxcontrib-towncrier==0.2.0a0 \ + --hash=sha256:31eed078e0a8b4c38dc30978dac8c53e2dfa7342ad8597d11816d1ea9ab0eabb \ + --hash=sha256:3cd4295c0198e753d964e2c06ee4ecd91a73a8d103385d08af9b05487ae68dd0 + # via -r docs/requirements.in +toml==0.10.2 \ + --hash=sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b \ + --hash=sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f + # via towncrier tomli==1.2.2 \ --hash=sha256:c6ce0015eb38820eaf32b5db832dbc26deb3dd427bd5f6556cf0acac2c214fee \ --hash=sha256:f04066f68f5554911363063a30b108d2b5a5b1a010aa8b6132af78489fe3aade # via setuptools-scm -typing-extensions==4.0.1 \ - --hash=sha256:4ca091dea149f945ec56afb48dae714f21e8692ef22a395223bcd328961b6a0e \ - --hash=sha256:7f001e5ac290a0c0401508864c7ec868be4e701886d5b573a9528ed3973d9d3b - # via markdown-it-py +towncrier==21.3.0 \ + --hash=sha256:6eed0bc924d72c98c000cb8a64de3bd566e5cb0d11032b73fcccf8a8f956ddfe \ + --hash=sha256:e6ccec65418bbcb8de5c908003e130e37fe0e9d6396cb77c1338241071edc082 + # via sphinxcontrib-towncrier uc-micro-py==1.0.1 \ --hash=sha256:316cfb8b6862a0f1d03540f0ae6e7b033ff1fa0ddbe60c12cbe0d4cec846a69f \ --hash=sha256:b7cdf4ea79433043ddfe2c82210208f26f7962c0cfbe3bacb05ee879a7fdb596