diff --git a/.github/workflows/ci-copier.yml b/.github/workflows/ci-copier.yml index 62c4c33..dcbfe84 100644 --- a/.github/workflows/ci-copier.yml +++ b/.github/workflows/ci-copier.yml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - minimal-python-version: [py39, py311, py313] + minimal-python-version: [py310, py311, py314] steps: - name: Checkout branch uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -126,3 +126,20 @@ jobs: do curl -Ls --header "$AUTH" --request POST "$GITHUB_API_URL/repos/${GITHUB_REPOSITORY}/actions/runs/$line/cancel" > /dev/null done + + finalize: + name: Test CI of generated package (all) + timeout-minutes: 5 + runs-on: ubuntu-latest + needs: test-generated-package-ci + if: always() && !cancelled() + steps: + - if: needs.test-generated-package-ci.result == 'success' + name: All tests passed + run: echo All tests passed + + - if: needs.test-generated-package-ci.result != 'success' + name: Some tests failed + run: | + echo Some tests failed + exit 1 diff --git a/copier.yml b/copier.yml index df8fb2c..467deca 100644 --- a/copier.yml +++ b/copier.yml @@ -46,17 +46,12 @@ minimal_python_version: type: str help: What is the minimal Python version you want to support? choices: - - py39 - py310 - py311 - py312 - py313 - default: py39 - -minimal_python_version_sortable: - type: str - default: "{{ minimal_python_version.replace('py39', 'py309') }}" - when: false + - py314 + default: py310 use_devcontainer: type: bool diff --git a/template/.github/workflows/ci.yml.jinja b/template/.github/workflows/ci.yml.jinja index a9591f5..fd66ce5 100644 --- a/template/.github/workflows/ci.yml.jinja +++ b/template/.github/workflows/ci.yml.jinja @@ -36,7 +36,7 @@ jobs: strategy: fail-fast: false matrix: -{%- set python_versions = ["py39", "py310", "py311", "py312", "py313"] %} +{%- set python_versions = ["py310", "py311", "py312", "py313", "py314"] %} {%- set minimal_version_index = python_versions.index(minimal_python_version) %} environment: {%- for python_version in python_versions[minimal_version_index:] %} diff --git a/template/pixi.toml.jinja b/template/pixi.toml.jinja index b96a6ba..3408126 100644 --- a/template/pixi.toml.jinja +++ b/template/pixi.toml.jinja @@ -42,35 +42,35 @@ zizmor = "*" pre-commit-install = "lefthook install" lint = "lefthook run pre-commit --all-files" -{% if minimal_python_version_sortable <= "py309" %}[feature.py39.dependencies] -python = "3.9.*" -{% endif %}{% if minimal_python_version_sortable <= "py310" %}[feature.py310.dependencies] +{% if minimal_python_version <= "py310" %}[feature.py310.dependencies] python = "3.10.*" -{% endif %}{% if minimal_python_version_sortable <= "py311" %}[feature.py311.dependencies] +{% endif %}{% if minimal_python_version <= "py311" %}[feature.py311.dependencies] python = "3.11.*" -{% endif %}{% if minimal_python_version_sortable <= "py312" %}[feature.py312.dependencies] +{% endif %}{% if minimal_python_version <= "py312" %}[feature.py312.dependencies] python = "3.12.*" -{% endif %}{% if minimal_python_version_sortable <= "py313" %}[feature.py313.dependencies] +{% endif %}{% if minimal_python_version <= "py313" %}[feature.py313.dependencies] python = "3.13.*" +{% endif %}{% if minimal_python_version <= "py314" %}[feature.py314.dependencies] +python = "3.14.*" {%- endif %} [environments] default = ["test", "lint"] -{%- if minimal_python_version_sortable <= "py309" %} -py39 = ["py39", "test"] -{%- endif %} -{%- if minimal_python_version_sortable <= "py310" %} +{%- if minimal_python_version <= "py310" %} py310 = ["py310", "test"] {%- endif %} -{%- if minimal_python_version_sortable <= "py311" %} +{%- if minimal_python_version <= "py311" %} py311 = ["py311", "test"] {%- endif %} -{%- if minimal_python_version_sortable <= "py312" %} +{%- if minimal_python_version <= "py312" %} py312 = ["py312", "test"] {%- endif %} -{%- if minimal_python_version_sortable <= "py313" %} +{%- if minimal_python_version <= "py313" %} py313 = ["py313", "test"] {%- endif %} +{%- if minimal_python_version <= "py314" %} +py314 = ["py314", "test"] +{%- endif %} {%- if build_docs %} docs = ["docs"] {%- endif %} diff --git a/template/pyproject.toml.jinja b/template/pyproject.toml.jinja index e03b8ce..ec7364a 100644 --- a/template/pyproject.toml.jinja +++ b/template/pyproject.toml.jinja @@ -11,19 +11,19 @@ authors = [{ name = "{{ author_name }}", email = "{{ author_email }}" }] dynamic = ["version"] classifiers = [ "Programming Language :: Python :: 3", -{%- if minimal_python_version_sortable <= "py309" %} - "Programming Language :: Python :: 3.9", -{%- endif %} -{%- if minimal_python_version_sortable <= "py310" %} +{%- if minimal_python_version <= "py310" %} "Programming Language :: Python :: 3.10", {%- endif %} -{%- if minimal_python_version_sortable <= "py311" %} +{%- if minimal_python_version <= "py311" %} "Programming Language :: Python :: 3.11", {%- endif %} -{%- if minimal_python_version_sortable <= "py312" %} +{%- if minimal_python_version <= "py312" %} "Programming Language :: Python :: 3.12", {%- endif %} +{%- if minimal_python_version <= "py313" %} "Programming Language :: Python :: 3.13", +{%- endif %} + "Programming Language :: Python :: 3.14", ] requires-python = ">={{ minimal_python_version.replace('py3', '3.') }}" readme = "README.md" diff --git a/tests/test_template.py b/tests/test_template.py index 4e876d8..cb7f378 100644 --- a/tests/test_template.py +++ b/tests/test_template.py @@ -47,11 +47,11 @@ def test_add_autobump_workflow(generate_project, add_autobump_workflow): @pytest.mark.parametrize( - "minimal_python_version", ["py39", "py310", "py311", "py312", "py313"] + "minimal_python_version", ["py310", "py311", "py312", "py313", "py314"] ) def test_minimal_python_version(generate_project, minimal_python_version: str): minimal_python_version_str = minimal_python_version.replace("py3", "3.") - all_supported_python_versions = ["3.9", "3.10", "3.11", "3.12", "3.13"] + all_supported_python_versions = ["3.10", "3.11", "3.12", "3.13", "3.14"] all_supported_python_envs = [ f"py{version.replace('.', '')}" for version in all_supported_python_versions ]