From 60f5d85a6abd74aa39b877b6a92f39f94b527b6e Mon Sep 17 00:00:00 2001 From: konstantinos Date: Sat, 9 Mar 2024 16:41:28 +0200 Subject: [PATCH 1/6] ci: enable Python 3.12 CI Builds --- .github/workflows/test.yaml | 8 +++++--- .../35_development/gitops-v2-cheatsheet.md | 4 ++-- pyproject.toml | 3 ++- tox.ini | 17 +++++++++-------- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 719ff5bf..b2f09a38 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -26,7 +26,7 @@ on: env: ### STRESS TEST Job MATRIX ### - FULL_MATRIX_STRATEGY: "{\"platform\": [\"ubuntu-latest\", \"macos-latest\", \"windows-latest\"], \"python-version\": [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\"]}" + FULL_MATRIX_STRATEGY: "{\"platform\": [\"ubuntu-latest\", \"macos-latest\", \"windows-latest\"], \"python-version\": [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.12\"]}" # Python 3.7 has reached End of Life (EOL) on June 27th, 2023 # Python 3.12 is in bugfix mode, same as 3.11 -> can start supporting 3.12 it UBUNTU_PY310_STRATEGY: "{\"platform\": [\"ubuntu-latest\"], \"python-version\": [\"3.10\"]}" @@ -104,10 +104,12 @@ jobs: if [[ "$affected_components" =~ "Distro" ]]; then echo "matrix=$TEST_STRATEGY" >> $GITHUB_OUTPUT - elif [[ "$affected_components" =~ "Docs" ]]; then + else + echo "matrix=$UBUNTU_PY310_STRATEGY" >> $GITHUB_OUTPUT + fi + if [[ "$affected_components" =~ "Docs" ]]; then # set policy to 1 to trigger Docs Build (higher level override might be in place) PIPE_DOCS_POLICY="${{ (env.DOCS_JOB_ON != 'true' && '0') || (env.ALWAYS_DOCS == 'true' && '1') || '1' }}" - echo "matrix=$UBUNTU_PY310_STRATEGY" >> $GITHUB_OUTPUT fi else diff --git a/docs/contents/35_development/gitops-v2-cheatsheet.md b/docs/contents/35_development/gitops-v2-cheatsheet.md index 7333881f..0aa98033 100644 --- a/docs/contents/35_development/gitops-v2-cheatsheet.md +++ b/docs/contents/35_development/gitops-v2-cheatsheet.md @@ -96,5 +96,5 @@ Clean Local with: ```shell git tag -d board-request git tag -d auto-prod -``` -git checkout release && git rebase master \ No newline at end of file +git checkout release && git rebase master +``` \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e64950ef..63a598fe 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,11 +39,12 @@ classifiers = [ "Operating System :: POSIX :: Linux", "Operating System :: MacOS", "Programming Language :: Python", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Software Distribution", diff --git a/tox.ini b/tox.ini index 81d4dd86..ff34631d 100755 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - {py311, py310, py39, py38, py37}-{dev, sdist, wheel}-{linux, macos, windows} + {py312, py311, py310, py39, py38, py37}-{dev, sdist, wheel}-{linux, macos, windows} coverage isolated_build = true skip_missing_interpreters = true @@ -13,6 +13,7 @@ python = 3.9: {py39}{, -path, -sdist, -wheel, -dev} 3.10: {py310}{, -path, -sdist, -wheel, -dev} 3.11: {py311}{, -path, -sdist, -wheel, -dev} + 3.12: {py312}{, -path, -sdist, -wheel, -dev} [gh-actions:env] @@ -66,7 +67,7 @@ commands = {posargs:-n auto {toxinidir}{/}tests} # PATH -[testenv:{py311, py310, py39, py38, py37, py36, pypy3}-path{, -linux, -macos, -windows}] +[testenv:{py312, py311, py310, py39, py38, py37, py36, pypy3}-path{, -linux, -macos, -windows}] description = Add Source Code to Path & Test setenv = {[testenv]setenv} @@ -78,7 +79,7 @@ commands = {[testenv]commands} # SDIST -[testenv:{py311-, py310-, py39-, py38-, py37-, py36-, pypy3-,}sdist{, -linux, -macos}] +[testenv:{py312, py311-, py310-, py39-, py38-, py37-, py36-, pypy3-,}sdist{, -linux, -macos}] description = Install as Source Distribution & Test basepython = {env:TOXPYTHON:python3} @@ -87,7 +88,7 @@ description = Install as Source Distribution & Test basepython = {env:TOXPYTHON:python3} # SDIST Windows special cases -[testenv:{py311-, py310-, py39-, py38-, pypy3-,}sdist-windows] +[testenv:{py312, py311-, py310-, py39-, py38-, pypy3-,}sdist-windows] description = Install as Source Distribution & Test basepython = {env:TOXPYTHON:python3} setenv = @@ -103,7 +104,7 @@ commands_pre = pip install --exists-action w --force-reinstall "{env:_WHEEL_DIR}{/}{env:_WHEEL}[test]" # Build WHEEL via PIP -[testenv:{py311-, py310-, py39-, py38-, py37-, py36-, pypy3-,}wheel{, -linux, -macos, -windows}] +[testenv:{py312, py311-, py310-, py39-, py38-, py37-, py36-, pypy3-,}wheel{, -linux, -macos, -windows}] description = Build Wheel, via pip basepython = {env:TOXPYTHON:python3} setenv = {[wheel_env]setenv} @@ -112,7 +113,7 @@ changedir = {toxinidir} commands = pip wheel --wheel-dir {env:_WHEEL_DIR} {toxinidir} # Install WHEEL and TEST -[testenv:{py311-, py310-, py39-, py38-, py37-, py36-, pypy3-,}wheel-test{, -linux, -macos}] +[testenv:{py312, py311-, py310-, py39-, py38-, py37-, py36-, pypy3-,}wheel-test{, -linux, -macos}] description = Install Wheel, and Test basepython = {env:TOXPYTHON:python3} setenv = @@ -123,7 +124,7 @@ changedir = {toxinidir} commands_pre = {[wheel_env]commands_pre} # Install WHEEL and TEST - Special case on Windows -[testenv:{py311-, py310-, py39-, py38-, }wheel-test-windows] +[testenv:{py312, py311-, py310-, py39-, py38-, }wheel-test-windows] description = Install Wheel, and Test basepython = {env:TOXPYTHON:python3} setenv = @@ -136,7 +137,7 @@ commands_pre = {[wheel_env]commands_pre} ## DEV on CI ## -[testenv:{py311, py310, py39, py38, py37, py36, pypy3}-dev{, -linux, -macos, -windows}] +[testenv:{py312, py311, py310, py39, py38, py37, py36, pypy3}-dev{, -linux, -macos, -windows}] description = Install in 'edit' mode & Test usedevelop = true From e2950942422803053d9642af23e44243af091f51 Mon Sep 17 00:00:00 2001 From: konstantinos Date: Sat, 9 Mar 2024 16:42:56 +0200 Subject: [PATCH 2/6] empemerally do cross-platoform Python 3.12 CI Tests --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b2f09a38..24949c61 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,7 +29,7 @@ env: FULL_MATRIX_STRATEGY: "{\"platform\": [\"ubuntu-latest\", \"macos-latest\", \"windows-latest\"], \"python-version\": [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.12\"]}" # Python 3.7 has reached End of Life (EOL) on June 27th, 2023 # Python 3.12 is in bugfix mode, same as 3.11 -> can start supporting 3.12 it - UBUNTU_PY310_STRATEGY: "{\"platform\": [\"ubuntu-latest\"], \"python-version\": [\"3.10\"]}" + UBUNTU_PY310_STRATEGY: "{\"platform\": [\"ubuntu-latest\", \"macos-latest\", \"windows-latest\"], \"python-version\": [\"3.12\"]}" TEST_STRATEGY: "{\"platform\": [\"ubuntu-latest\", \"macos-latest\", \"windows-latest\"], \"python-version\":[\"3.10\"]}" ##### JOB ON/OFF SWITCHES - 1st level overrides ##### From 35bd87f6076f389105c23a002622ff7bd8172f44 Mon Sep 17 00:00:00 2001 From: konstantinos Date: Sat, 9 Mar 2024 17:01:27 +0200 Subject: [PATCH 3/6] fix tox syntax --- tox.ini | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tox.ini b/tox.ini index ff34631d..eb372427 100755 --- a/tox.ini +++ b/tox.ini @@ -79,7 +79,7 @@ commands = {[testenv]commands} # SDIST -[testenv:{py312, py311-, py310-, py39-, py38-, py37-, py36-, pypy3-,}sdist{, -linux, -macos}] +[testenv:{py312-, py311-, py310-, py39-, py38-, py37-, py36-, pypy3-,}sdist{, -linux, -macos}] description = Install as Source Distribution & Test basepython = {env:TOXPYTHON:python3} @@ -88,7 +88,7 @@ description = Install as Source Distribution & Test basepython = {env:TOXPYTHON:python3} # SDIST Windows special cases -[testenv:{py312, py311-, py310-, py39-, py38-, pypy3-,}sdist-windows] +[testenv:{py312-, py311-, py310-, py39-, py38-, pypy3-,}sdist-windows] description = Install as Source Distribution & Test basepython = {env:TOXPYTHON:python3} setenv = @@ -104,7 +104,7 @@ commands_pre = pip install --exists-action w --force-reinstall "{env:_WHEEL_DIR}{/}{env:_WHEEL}[test]" # Build WHEEL via PIP -[testenv:{py312, py311-, py310-, py39-, py38-, py37-, py36-, pypy3-,}wheel{, -linux, -macos, -windows}] +[testenv:{py312-, py311-, py310-, py39-, py38-, py37-, py36-, pypy3-,}wheel{, -linux, -macos, -windows}] description = Build Wheel, via pip basepython = {env:TOXPYTHON:python3} setenv = {[wheel_env]setenv} @@ -113,7 +113,7 @@ changedir = {toxinidir} commands = pip wheel --wheel-dir {env:_WHEEL_DIR} {toxinidir} # Install WHEEL and TEST -[testenv:{py312, py311-, py310-, py39-, py38-, py37-, py36-, pypy3-,}wheel-test{, -linux, -macos}] +[testenv:{py312-, py311-, py310-, py39-, py38-, py37-, py36-, pypy3-,}wheel-test{, -linux, -macos}] description = Install Wheel, and Test basepython = {env:TOXPYTHON:python3} setenv = @@ -124,7 +124,7 @@ changedir = {toxinidir} commands_pre = {[wheel_env]commands_pre} # Install WHEEL and TEST - Special case on Windows -[testenv:{py312, py311-, py310-, py39-, py38-, }wheel-test-windows] +[testenv:{py312-, py311-, py310-, py39-, py38-, }wheel-test-windows] description = Install Wheel, and Test basepython = {env:TOXPYTHON:python3} setenv = From 309c9cd266ca49b5681c2637f63580a1b8c05f73 Mon Sep 17 00:00:00 2001 From: konstantinos Date: Sun, 10 Mar 2024 01:01:11 +0200 Subject: [PATCH 4/6] set ci to prod state --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 24949c61..b2f09a38 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,7 +29,7 @@ env: FULL_MATRIX_STRATEGY: "{\"platform\": [\"ubuntu-latest\", \"macos-latest\", \"windows-latest\"], \"python-version\": [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.12\"]}" # Python 3.7 has reached End of Life (EOL) on June 27th, 2023 # Python 3.12 is in bugfix mode, same as 3.11 -> can start supporting 3.12 it - UBUNTU_PY310_STRATEGY: "{\"platform\": [\"ubuntu-latest\", \"macos-latest\", \"windows-latest\"], \"python-version\": [\"3.12\"]}" + UBUNTU_PY310_STRATEGY: "{\"platform\": [\"ubuntu-latest\"], \"python-version\": [\"3.10\"]}" TEST_STRATEGY: "{\"platform\": [\"ubuntu-latest\", \"macos-latest\", \"windows-latest\"], \"python-version\":[\"3.10\"]}" ##### JOB ON/OFF SWITCHES - 1st level overrides ##### From fdc86a5496a5297ac39b74815e33566989e1838c Mon Sep 17 00:00:00 2001 From: konstantinos Date: Sun, 10 Mar 2024 01:02:51 +0200 Subject: [PATCH 5/6] release(semantic_version): bump version to 2.2.0 --- README.rst | 4 ++-- docs/conf.py | 2 +- pyproject.toml | 2 +- src/cookiecutter_python/__init__.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 8a1f8539..c81c6cf2 100755 --- a/README.rst +++ b/README.rst @@ -275,9 +275,9 @@ Free/Libre and Open Source Software (FLOSS) .. Github Releases & Tags -.. |commits_since_specific_tag_on_master| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v2.1.0/master?color=blue&logo=github +.. |commits_since_specific_tag_on_master| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v2.2.0/master?color=blue&logo=github :alt: GitHub commits since tagged version (branch) - :target: https://github.com/boromir674/cookiecutter-python-package/compare/v2.1.0..master + :target: https://github.com/boromir674/cookiecutter-python-package/compare/v2.2.0..master .. |commits_since_latest_github_release| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/latest?color=blue&logo=semver&sort=semver :alt: GitHub commits since latest release (by SemVer) diff --git a/docs/conf.py b/docs/conf.py index c732a6de..36b41cbd 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -30,7 +30,7 @@ author = 'Konstantinos Lampridis' # The full version, including alpha/beta/rc tags -release = '2.1.0' +release = '2.2.0' # -- General configuration --------------------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index 63a598fe..bca10bc8 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ build-backend = "poetry.core.masonry.api" ## Also renders on pypi as 'subtitle' [tool.poetry] name = "cookiecutter_python" -version = "2.1.0" +version = "2.2.0" description = "1-click Generator of Python Project, from Template with streamlined \"DevOps\" using a powerful CI/CD Pipeline." authors = ["Konstantinos Lampridis "] maintainers = ["Konstantinos Lampridis "] diff --git a/src/cookiecutter_python/__init__.py b/src/cookiecutter_python/__init__.py index cf9bb6ca..e424d952 100755 --- a/src/cookiecutter_python/__init__.py +++ b/src/cookiecutter_python/__init__.py @@ -1,3 +1,3 @@ -__version__ = '2.1.0' +__version__ = '2.2.0' from . import _logging # noqa From 6ac28a5fd3c33af7e22dd81177cae3ac5df6f2ba Mon Sep 17 00:00:00 2001 From: konstantinos Date: Sun, 10 Mar 2024 01:03:42 +0200 Subject: [PATCH 6/6] docs: update changelog with the release's changes --- CHANGELOG.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2c86a9d4..c6326c80 100755 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,17 @@ Changelog ========= +2.2.0 (2024-03-10) +================== + +Changes +^^^^^^^ + +ci +"" +- enable Python 3.12 CI Builds + + 2.1.0 (2024-03-09) ==================