From cf4fa774e40ef06c8b45c1261e00c373fe7b1f94 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sat, 10 Feb 2024 17:56:25 +0000 Subject: [PATCH] ENH: Add towncrier for management of changes --- CHANGES.rst | 4 ++-- changelog.d/+condaChannels.bugfix.rst | 1 + changelog.d/+matrixReq.bugfix.rst | 2 ++ changelog.d/.gitignore | 1 + changelog.d/1372.bugfix.rst | 2 ++ changelog.d/1373.bugfix.rst | 2 ++ changelog.d/readme.md | 26 ++++++++++++++++++++++++++ towncrier.toml | 25 +++++++++++++++++++++++++ 8 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 changelog.d/+condaChannels.bugfix.rst create mode 100644 changelog.d/+matrixReq.bugfix.rst create mode 100644 changelog.d/.gitignore create mode 100644 changelog.d/1372.bugfix.rst create mode 100644 changelog.d/1373.bugfix.rst create mode 100644 changelog.d/readme.md create mode 100644 towncrier.toml diff --git a/CHANGES.rst b/CHANGES.rst index b1a3afc9e..6a6a6fc41 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,5 @@ 0.6.1 (2023-09-11) ----------------------------- +------------------ Bug Fixes ^^^^^^^^^ @@ -18,7 +18,7 @@ Other Changes and Additions - ``asv`` now uses Github Actions exclusively for Windows and Linux 0.6.0 (2023-08-20) ----------------------------- +------------------ New Features ^^^^^^^^^^^^ diff --git a/changelog.d/+condaChannels.bugfix.rst b/changelog.d/+condaChannels.bugfix.rst new file mode 100644 index 000000000..75b67ceb5 --- /dev/null +++ b/changelog.d/+condaChannels.bugfix.rst @@ -0,0 +1 @@ +``conda-forge`` is no longer a default channel for ``mamba``. (#1373) diff --git a/changelog.d/+matrixReq.bugfix.rst b/changelog.d/+matrixReq.bugfix.rst new file mode 100644 index 000000000..fadf7e54f --- /dev/null +++ b/changelog.d/+matrixReq.bugfix.rst @@ -0,0 +1,2 @@ +Fixed a bug where ``matrix`` requirements were dropped if an environment file +was specified. (#1373) diff --git a/changelog.d/.gitignore b/changelog.d/.gitignore new file mode 100644 index 000000000..f935021a8 --- /dev/null +++ b/changelog.d/.gitignore @@ -0,0 +1 @@ +!.gitignore diff --git a/changelog.d/1372.bugfix.rst b/changelog.d/1372.bugfix.rst new file mode 100644 index 000000000..12d8fa174 --- /dev/null +++ b/changelog.d/1372.bugfix.rst @@ -0,0 +1,2 @@ +The ``mamba`` plugin works correctly for newer versions (>=1.5) of +``libmambapy`` diff --git a/changelog.d/1373.bugfix.rst b/changelog.d/1373.bugfix.rst new file mode 100644 index 000000000..e888c32f7 --- /dev/null +++ b/changelog.d/1373.bugfix.rst @@ -0,0 +1,2 @@ +The ``mamba`` plugin respects the ``MAMBARC`` environment if set, taking +channels and channel priority from the file in the environment variable. diff --git a/changelog.d/readme.md b/changelog.d/readme.md new file mode 100644 index 000000000..b892e96fe --- /dev/null +++ b/changelog.d/readme.md @@ -0,0 +1,26 @@ +# Usage + +`towncrier` is used for keeping track of the changelog. The relevant configuration aspects are: +- Each file can be formatted using reST +- The contents are rendered in bullets +- Each file should be labeled with the corresponding **pull request**, e.g. `NUM.TYPE.rst` + + Where there is no clear corresponding pull request, `+` can be used instead of `NUM` + +For mapping the types to headings, the following table can be used: + + +| **TYPE** | **Heading** | +| feat | New Features | +| api | API Changes | +| bugfix | Bug Fixes | +| misc | Other Changes and Additions | + +## Release + + +```bash +# View the changes +towncrier build --draft --version 0.6.2 --date "$(date -u +%Y-%m-%d)" +# Modify CHANGES.rst +towncrier build --version 0.6.3 --date "$(date -u +%Y-%m-%d)" +``` diff --git a/towncrier.toml b/towncrier.toml new file mode 100644 index 000000000..4ceb2cf23 --- /dev/null +++ b/towncrier.toml @@ -0,0 +1,25 @@ +[tool.towncrier] +directory = "changelog.d" +filename = "CHANGES.rst" +underlines = ["-", "^", "~"] +wrap = true + +[[tool.towncrier.type]] +directory = "feat" +name = "New Features" +showcontent = true + +[[tool.towncrier.type]] +directory = "api" +name = "API Changes" +showcontent = true + +[[tool.towncrier.type]] +directory = "bugfix" +name = "Bug Fixes" +showcontent = true + +[[tool.towncrier.type]] +directory = "misc" +name = "Other Changes and Additions" +showcontent = true