From a5ef6dc09c8bf56f32f7d2ad6c01eee63ff8c01a Mon Sep 17 00:00:00 2001 From: Kristjan Eimre Date: Wed, 5 Feb 2025 17:38:37 +0200 Subject: [PATCH] add bumpver --- README.md | 14 ++++++++++++++ pyproject.toml | 16 +++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ba09ef..c9f0110 100644 --- a/README.md +++ b/README.md @@ -78,3 +78,17 @@ cgo.write_cube("./homo.cube", orbital_nr=0) Here's the resulting cube file, illustrating the constrained region of evaluation: + + +### For maintainers: + +In order to make a new release of the library and publish to PYPI, run + +```shell +bumpver update --major/--minor/--patch +``` + +This will + +- update version numbers, make a corresponding git commit and a git tag; +- push this commit and tag to Github, which triggers the Github Action that makes a new Github Release and publishes the package to PYPI. diff --git a/pyproject.toml b/pyproject.toml index a063608..c371033 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "Bug Tracker" = "https://github.com/nanotech-empa/cp2k-spm-tools/issues" [project.optional-dependencies] -dev = ["ruff", "pre-commit"] +dev = ["ruff", "pre-commit", "bumpver>=2023.1129"] [project.scripts] cp2k-bader-bond-order = "cp2k_spm_tools.cli.bader_bond_order:main" @@ -61,3 +61,17 @@ exclude = ["*.ipynb"] fixable = ["ALL"] select = ["E", "F", "I", "W"] ignore = ["E402", "E501", "E741", "E722"] + +[tool.bumpver] +current_version = "v1.4.4" +version_pattern = "vMAJOR.MINOR.PATCH[PYTAGNUM]" +commit_message = "Bump version {old_version} -> {new_version}" +commit = true +tag = true +push = true + +[tool.bumpver.file_patterns] +"pyproject.toml" = [ + 'version = "{pep440_version}"', + 'current_version = "{version}"', +]