From 88f076b9655fef47f0ad3ef7a2c9c6e3052ab47b Mon Sep 17 00:00:00 2001 From: Enrique Gonzalez Paredes Date: Mon, 25 Mar 2024 10:08:38 +0100 Subject: [PATCH] Migrate from discontinued bump2version tool to the new supported fork bump-my-version --- .bumpversion.cfg | 10 ---------- docs/development/tools/release.md | 4 ++-- pyproject.toml | 23 ++++++++++++++++++++++- requirements-dev.in | 1 + 4 files changed, 25 insertions(+), 13 deletions(-) delete mode 100644 .bumpversion.cfg diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index 7f5a08b19e..0000000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,10 +0,0 @@ -[bumpversion] -current_version = 1.0.3 -parse = (?P\d+)\.(?P\d+)(\.(?P\d+))? -serialize = - {major}.{minor}.{patch} - -[bumpversion:file:src/gt4py/__about__.py] -parse = \"(?P\d+)\.(?P\d+)(\.(?P\d+))?\" -serialize = - {major}.{minor}.{patch} diff --git a/docs/development/tools/release.md b/docs/development/tools/release.md index 7feb8711b1..8809d32c06 100644 --- a/docs/development/tools/release.md +++ b/docs/development/tools/release.md @@ -6,10 +6,10 @@ Currently, GT4Py releases are published in PyPI (and TestPyPI) and also as commi 1. Make sure all the expected changes (new features, bug fixes, documentation changes, etc.) are already included in the `main` public branch. -2. Use **bump2version** to update the version number. +2. Use **bump-my-version** to update the version number. ```bash - $ bump2version minor # or patch + $ bump-my-version bump minor # or patch ``` 3. Update the [CHANGELOG.md](CHANGELOG.md) file to document the changes included in the new release. Note that this step becomes much simpler when commit messages follow the [Conventional Commits][conventional-commits] convention as encouraged in the [Pull Request and Merge Guidelines](CONTRIBUTING.md#pull-request-and-merge-guidelines) section of the contributing guidelines. diff --git a/pyproject.toml b/pyproject.toml index 43ebaa9d2a..5da8843354 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ dependencies = [ 'pybind11>=2.10.1', 'setuptools>=65.5.0', 'tabulate>=0.8.10', - 'typing-extensions>=4.2,<4.6.0', + 'typing-extensions>=4.3.0,<4.6.0', 'xxhash>=1.4.4,<3.1.0' ] description = 'Python library for generating high-performance implementations of stencil kernels for weather and climate modeling from a domain-specific language (DSL)' @@ -94,6 +94,27 @@ Homepage = 'https://gridtools.github.io/' Source = 'https://github.com/GridTools/gt4py' # ---- Other tools ---- +# -- bump-my-version -- +[tool.bumpversion] +allow_dirty = false +commit = false +commit_args = '' +current_version = '1.0.3' +ignore_missing_version = false +message = 'Bump version: {current_version} → {new_version}' +parse = '(?P\d+)\.(?P\d+)(\.(?P\d+))?' +regex = false +replace = '{new_version}' +search = '{current_version}' +serialize = ['{major}.{minor}.{patch}'] +sign_tags = false +tag = false +tag_message = 'Bump version: {current_version} → {new_version}' +tag_name = 'v{new_version}' + +[[tool.bumpversion.files]] +filename = "src/gt4py/__about__.py" + # -- coverage -- [tool.coverage] diff --git a/requirements-dev.in b/requirements-dev.in index 57981360a8..65e1a6af2d 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -5,6 +5,7 @@ # should be added here without constraints, so they will use the # constraints defined in `pyproject.toml`. # +bump-my-version>=0.19.3 clang-format>=9.0 cogapp>=3.3 coverage[toml]>=5.0