From 3ac9d5503b29f6efe0194a16d9614babf079ec61 Mon Sep 17 00:00:00 2001
From: Thibaut Lunet <thibaut.lunet@tuhh.de>
Date: Mon, 23 Sep 2024 12:01:59 +0200
Subject: [PATCH] TL: bump version to 5.5.2 + added release guide for
 maintainers (#489)

* TL: added release guide

* TL: additional detail

* Update 07_release_guide.md

* TL: minor correction on release guide

* TL: typo

* TL: lighter testing

* TL: bump version to 5.5.2

* TL: let's not care

---------

Co-authored-by: Robert Speck <pancetta@users.noreply.github.com>
---
 CITATION.cff                     |  4 ++--
 docs/contrib/06_new_project.md   |  2 +-
 docs/contrib/07_release_guide.md | 38 ++++++++++++++++++++++++++++++++
 docs/source/conf.py              |  2 +-
 pyproject.toml                   |  2 +-
 5 files changed, 43 insertions(+), 5 deletions(-)
 create mode 100644 docs/contrib/07_release_guide.md

diff --git a/CITATION.cff b/CITATION.cff
index a10cd4107..b87274cd4 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -30,9 +30,9 @@ authors:
     affiliation: "Jülich Supercomputing Centre, Forschungszentrum Jülich GmbH, 52425 Jülich, Germany"
 
 
-version: 5.5.1
+version: 5.5.2
 doi: 10.5281/zenodo.594191
-date-released: 2024-09-03
+date-released: 2024-09-23
 keywords: 
   - "parallel-in-time"
   - "spectral deferred corrections"
diff --git a/docs/contrib/06_new_project.md b/docs/contrib/06_new_project.md
index 2da72b0cf..5cb83dd29 100644
--- a/docs/contrib/06_new_project.md
+++ b/docs/contrib/06_new_project.md
@@ -57,4 +57,4 @@ We strongly encourage to describe and cite the current version of pySDC already
 
 :arrow_left: [Back to Documenting Code](./05_documenting_code.md) ---
 :arrow_up: [Contributing Summary](./../../CONTRIBUTING.md) ---
-:arrow_right: [Next to a cute picture of cat](https://www.vecteezy.com/photo/2098203-silver-tabby-cat-sitting-on-green-background)
\ No newline at end of file
+:arrow_right: [Next to publishing a new release](./07_release_guide.md)
\ No newline at end of file
diff --git a/docs/contrib/07_release_guide.md b/docs/contrib/07_release_guide.md
new file mode 100644
index 000000000..3d8ea07a8
--- /dev/null
+++ b/docs/contrib/07_release_guide.md
@@ -0,0 +1,38 @@
+# Publishing a new release (for maintainers only!)
+
+## Base conventions
+
+For each version update (a.k.a **releases**), we use [semantic versioning](https://semver.org/):
+
+- **patch** (from `*.*.{i}` to `*.*.{i+1}`): minor modifications, bugfixes, code reformating, small new features, new projects or playgrounds, new tests
+- **minor** (from `*.{i}.*` to `*.{i+1}.0`): addition of new major features, minor code structure changes without too much impact on the API (backward compatible)
+- **major** (from `{i}.*.*` to `{i+1}.0.0`): major changes in code structure, design, and API, with changes potentially breaking backward compatibility 
+
+## Release Pipeline
+
+First, create a `new-release` branch (or choose a similar name), either on your fork or on the main `pySDC` repo. Then, on commit:
+
+1. modify the project version number and, if necessary, the list of authors in `pyproject.toml`
+2. modify the documentation release number in `docs/source/conf.py`, and the version number for minor and major release. Also, if necessary, adapt the list of authors.
+3. modify the version number, release date and, if necessary, the list of authors  in `CITATION.cff`
+4. (for minor and major release **only**) add the release description in the `CHANGELOG.md` file, following the level of details you can find there
+
+Commit with the message: `bump version to x.x.x` where `x.x.x` is the new version. 
+Then create a pull request, and once all tests passed, you can `Merge and Squash`,
+possibly adding your initials as prefix of the final commit message.
+
+> 🔔 Don't forget to delete the `new-release` branch both locally and on your fork (or the main repo):
+
+```bash
+git push -d origin new-release  # delete on remote
+git branch -D new-release       # delete locally
+```
+
+Finally, [draft a new release](https://github.com/Parallel-in-Time/pySDC/releases/new) associated to a new tag 
+`v*.*.*` (with `*.*.*` the new version, and the ` + Create new tag: ... on publish` button).
+Add a comprehensive summary of the main changes, with appropriate thanks to all the contributors (cf previous releases), and publish it. This will trigger automatically a release update on [Zenodo](https://zenodo.org/doi/10.5281/zenodo.594191).
+For uploading the new release on [PyPI](https://pypi.org/project/pySDC/), this is done manually so you'll have to ask [Robert Speck (@pancetta)](https://github.com/pancetta) for support (ideally send him a quick email).
+
+:arrow_left: [Back to adding Project](./06_new_project.md) ---
+:arrow_up: [Contributing Summary](./../../CONTRIBUTING.md) ---
+:arrow_right: [Next to a cute picture of cat](https://www.vecteezy.com/photo/2098203-silver-tabby-cat-sitting-on-green-background)
diff --git a/docs/source/conf.py b/docs/source/conf.py
index bd401cf16..9a3eb65f0 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -72,7 +72,7 @@ author = 'Robert Speck, Thibaut Lunet, Thomas Baumann, Lisa Wimmer, Ikrom Akramo
 # The short X.Y version.
 version = '5.5'
 # The full version, including alpha/beta/rc tags.
-release = '5.5.1'
+release = '5.5.2'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/pyproject.toml b/pyproject.toml
index 036464a9e..3e6e776af 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
 
 [project]
 name = 'pySDC'
-version = '5.5.1'
+version = '5.5.2'
 description = 'A Python implementation of spectral deferred correction methods and the likes'
 license = {text = "BSD-2-Clause"}
 readme = 'README.md'
-- 
GitLab