From 5a126bf656a8f9b794ae5277fcd42a5c2050a3e6 Mon Sep 17 00:00:00 2001 From: Nicola Coretti Date: Thu, 5 Dec 2024 09:16:32 +0100 Subject: [PATCH 1/3] Add `__version__` member to `version.py` In order to improve compatibility with other version schemes, this alternative label for the version was added to the version file. --- doc/changes/unreleased.md | 1 + exasol/toolbox/pre_commit_hooks/package_version.py | 1 + exasol/toolbox/version.py | 1 + 3 files changed, 3 insertions(+) diff --git a/doc/changes/unreleased.md b/doc/changes/unreleased.md index d137c7b32..386d15c55 100644 --- a/doc/changes/unreleased.md +++ b/doc/changes/unreleased.md @@ -2,6 +2,7 @@ ## 🔧 Changed +* Add `__version__` member to generated `version.py` for comatibility with other versions schemes * Excluded pyupgrade from project check due to its destructive nature * Updated cookiecutter template - removed obsolete template file `version.html` diff --git a/exasol/toolbox/pre_commit_hooks/package_version.py b/exasol/toolbox/pre_commit_hooks/package_version.py index 7d12e03d1..6f6fb3b3d 100644 --- a/exasol/toolbox/pre_commit_hooks/package_version.py +++ b/exasol/toolbox/pre_commit_hooks/package_version.py @@ -32,6 +32,7 @@ MINOR = {minor} PATCH = {patch} VERSION = f"{{MAJOR}}.{{MINOR}}.{{PATCH}}" + __version__ = VERSION ''') + "\n" # fmt: on diff --git a/exasol/toolbox/version.py b/exasol/toolbox/version.py index f1173887f..e62424cd5 100644 --- a/exasol/toolbox/version.py +++ b/exasol/toolbox/version.py @@ -8,3 +8,4 @@ MINOR = 18 PATCH = 0 VERSION = f"{MAJOR}.{MINOR}.{PATCH}" +__version__ = VERSION From e70b0ed1787f500963e24b462df834c2391246c3 Mon Sep 17 00:00:00 2001 From: Nicola Coretti Date: Thu, 5 Dec 2024 09:19:49 +0100 Subject: [PATCH 2/3] Adjust cookiecutter project-template --- .../exasol/{{cookiecutter.package_name}}/version.py | 1 + 1 file changed, 1 insertion(+) diff --git a/project-template/{{cookiecutter.repo_name}}/exasol/{{cookiecutter.package_name}}/version.py b/project-template/{{cookiecutter.repo_name}}/exasol/{{cookiecutter.package_name}}/version.py index c98b7d063..daf848dec 100644 --- a/project-template/{{cookiecutter.repo_name}}/exasol/{{cookiecutter.package_name}}/version.py +++ b/project-template/{{cookiecutter.repo_name}}/exasol/{{cookiecutter.package_name}}/version.py @@ -8,3 +8,4 @@ MINOR = 1 PATCH = 0 VERSION = f"{MAJOR}.{MINOR}.{PATCH}" +__version__ = VERSION From 19cdc3d49f9e2ee9f6e9c7dc5d7762b647ad98ad Mon Sep 17 00:00:00 2001 From: Nicola Coretti Date: Thu, 5 Dec 2024 10:03:53 +0100 Subject: [PATCH 3/3] Update doc/changes/unreleased.md Co-authored-by: Pieterjan Spoelders --- doc/changes/unreleased.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changes/unreleased.md b/doc/changes/unreleased.md index 386d15c55..9624485c3 100644 --- a/doc/changes/unreleased.md +++ b/doc/changes/unreleased.md @@ -2,7 +2,7 @@ ## 🔧 Changed -* Add `__version__` member to generated `version.py` for comatibility with other versions schemes +* Add `__version__` member to generated `version.py` for compatibility with other versions schemes * Excluded pyupgrade from project check due to its destructive nature * Updated cookiecutter template - removed obsolete template file `version.html`