From 77194001a28aee4142db8369896bc24de58d6699 Mon Sep 17 00:00:00 2001 From: Sander van Rijn Date: Sun, 16 Nov 2025 17:43:32 +0100 Subject: [PATCH 1/5] Add 3.13 and 3.14 support, use 3.14 for CI --- .github/workflows/build.yml | 2 +- .github/workflows/tests.yml | 2 +- setup.cfg | 2 ++ template/project_setup.md.jinja | 2 ++ template/pyproject.toml.jinja | 4 +++- ...f AddGitHubActionBuild %}build.yml{% endif %}.jinja | 10 +++++----- ...bActionDocumentation %}documentation.yml{% endif %} | 4 ++-- .../{% if AddSonarCloud %}sonarcloud.yml{% endif %} | 4 ++-- 8 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a0ef2fcf..d85d7722 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: fail-fast: true matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cd6043fa..00957146 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: fail-fast: true matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} diff --git a/setup.cfg b/setup.cfg index f82fc793..2553c02d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,6 +15,8 @@ classifiers = Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 + Programming Language :: Python :: 3.14 description = Copier template to initialize Python projects in accordance with Netherlands eScience Center best practices long_description = file: README.md long_description_content_type = text/markdown diff --git a/template/project_setup.md.jinja b/template/project_setup.md.jinja index f5baf308..0d3ab136 100644 --- a/template/project_setup.md.jinja +++ b/template/project_setup.md.jinja @@ -14,6 +14,8 @@ This repository is set up with Python versions: - 3.10 - 3.11 - 3.12 +- 3.13 +- 3.14 Add or remove Python versions based on project requirements. See [the guide](https://guide.esciencecenter.nl/#/language_guides/python) for more information about Python diff --git a/template/pyproject.toml.jinja b/template/pyproject.toml.jinja index 1a854574..4c17e5a4 100644 --- a/template/pyproject.toml.jinja +++ b/template/pyproject.toml.jinja @@ -27,6 +27,8 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] dependencies = [] description = "{{ package_short_description|replace('\"', '\\\"') }}" @@ -106,7 +108,7 @@ command_line = "-m pytest" [tool.tox] legacy_tox_ini = """ [tox] -envlist = py310,py311,py312 +envlist = py310,py311,py312,py313,py314 skip_missing_interpreters = true {% if AddLocalTests -%} [testenv] diff --git a/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionBuild %}build.yml{% endif %}.jinja b/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionBuild %}build.yml{% endif %}.jinja index 4bddbb36..9830271d 100644 --- a/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionBuild %}build.yml{% endif %}.jinja +++ b/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionBuild %}build.yml{% endif %}.jinja @@ -17,7 +17,7 @@ jobs: fail-fast: true matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v6 - name: Set up Python ${{ '{{ ' -}} matrix.python-version }} @@ -46,10 +46,10 @@ jobs: fail-fast: false steps: - uses: actions/checkout@v6 - - name: Set up Python 3.12 + - name: Set up Python 3.14 uses: actions/setup-python@v6 with: - python-version: 3.12 + python-version: 3.14 - name: Python info shell: bash -e {0} run: | @@ -71,10 +71,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - name: Set up Python 3.12 + - name: Set up Python 3.14 uses: actions/setup-python@v6 with: - python-version: 3.12 + python-version: 3.14 - name: Upgrade pip and install dependencies run: | python -m pip install --upgrade pip setuptools diff --git a/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionDocumentation %}documentation.yml{% endif %} b/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionDocumentation %}documentation.yml{% endif %} index af2d22b3..7502c3db 100644 --- a/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionDocumentation %}documentation.yml{% endif %} +++ b/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionDocumentation %}documentation.yml{% endif %} @@ -16,10 +16,10 @@ jobs: fail-fast: false steps: - uses: actions/checkout@v6 - - name: Set up Python 3.12 + - name: Set up Python 3.14 uses: actions/setup-python@v6 with: - python-version: 3.12 + python-version: 3.14 - name: Python info shell: bash -e {0} run: | diff --git a/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddSonarCloud %}sonarcloud.yml{% endif %} b/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddSonarCloud %}sonarcloud.yml{% endif %} index c28505a4..2d6a7885 100644 --- a/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddSonarCloud %}sonarcloud.yml{% endif %} +++ b/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddSonarCloud %}sonarcloud.yml{% endif %} @@ -18,10 +18,10 @@ jobs: - uses: actions/checkout@v6 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up Python + - name: Set up Python 3.14 uses: actions/setup-python@v6 with: - python-version: 3.12 + python-version: 3.14 - name: Python info shell: bash -e {0} run: | From ba74740ec7b2df720cf071f6e34bee0658a7cce9 Mon Sep 17 00:00:00 2001 From: Sander van Rijn Date: Mon, 17 Nov 2025 12:03:08 +0100 Subject: [PATCH 2/5] update changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec7d3e4d..097f6f70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,12 @@ ### Added -- Typing support. [#698](https://github.com/NLeSC/python-template/pull/698) +* Add Python 3.13 and 3.14 support [#703](https://github.com/NLeSC/python-template/pull/703) +* Typing support. [#698](https://github.com/NLeSC/python-template/pull/698) ### Changed +* Update CI actions to use Python 3.14 instead of 3.12 [#703](https://github.com/NLeSC/python-template/pull/703) * Recommend `ruff format` instead of `yapf` for fixing code style readability [#695](https://github.com/NLeSC/python-template/pull/695) ### Removed From 3816c36fff0fe61aec85a6b43cb0dedbc5360e00 Mon Sep 17 00:00:00 2001 From: Sander van Rijn Date: Sun, 23 Nov 2025 01:35:05 +0100 Subject: [PATCH 3/5] remove skip exception: python < 3.9 no longer supported --- tests/test_project.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/test_project.py b/tests/test_project.py index a2b5a35f..aba70347 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -131,8 +131,6 @@ def test_generate_api_docs(baked_with_development_dependencies, project_env_bin_ assert (project_dir / 'docs' / '_build' / 'html' / 'index.html').exists() -@pytest.mark.skipif(sys.version_info < (3, 9), reason= -"requires python 3.9 or higher, see https://github.com/NLeSC/python-template/pull/347#issuecomment-1710684574") def test_coverage_api_docs(baked_with_development_dependencies, project_env_bin_dir): project_dir = baked_with_development_dependencies bin_dir = project_env_bin_dir From b26d52ee34ea3e2cce953fe199c070297eb62a9a Mon Sep 17 00:00:00 2001 From: Sander van Rijn Date: Mon, 8 Dec 2025 13:48:31 +0100 Subject: [PATCH 4/5] remove python 3.10 and 3.11 support --- .github/workflows/build.yml | 2 +- .github/workflows/tests.yml | 2 +- CHANGELOG.md | 2 ++ setup.cfg | 4 +--- template/project_setup.md.jinja | 2 -- template/pyproject.toml.jinja | 6 ++---- .../{% if AddGitHubActionBuild %}build.yml{% endif %}.jinja | 2 +- 7 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d85d7722..aa994c01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: fail-fast: true matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] + python-version: ['3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 00957146..5322dec7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: fail-fast: true matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] + python-version: ['3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 097f6f70..9d9ca70d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ ### Removed +* Removed Python 3.10 and 3.11 support + ## 0.6.1 ### Added diff --git a/setup.cfg b/setup.cfg index 2553c02d..eb229698 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,8 +12,6 @@ classifiers = License :: OSI Approved :: Apache Software License Natural Language :: English Programming Language :: Python :: 3 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 Programming Language :: Python :: 3.13 Programming Language :: Python :: 3.14 @@ -30,7 +28,7 @@ version = 0.6.1 [options] zip_safe = False include_package_data = True -python_requires = >=3.10 +python_requires = >=3.12 packages = install_requires = copier==9.2.0 diff --git a/template/project_setup.md.jinja b/template/project_setup.md.jinja index 0d3ab136..d19a8e2d 100644 --- a/template/project_setup.md.jinja +++ b/template/project_setup.md.jinja @@ -11,8 +11,6 @@ checklist](https://guide.esciencecenter.nl/#/best_practices?id=checklist). This repository is set up with Python versions: -- 3.10 -- 3.11 - 3.12 - 3.13 - 3.14 diff --git a/template/pyproject.toml.jinja b/template/pyproject.toml.jinja index 4c17e5a4..09ec7e88 100644 --- a/template/pyproject.toml.jinja +++ b/template/pyproject.toml.jinja @@ -24,8 +24,6 @@ classifiers = [ }[license] }}", "Natural Language :: English", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", @@ -40,7 +38,7 @@ keywords = [ license = {file = "LICENSE"} name = "{{ package_name }}" readme = {file = "README.md", content-type = "text/markdown"} -requires-python = ">=3.10" +requires-python = ">=3.12" version = "{{ version }}" [project.optional-dependencies] @@ -108,7 +106,7 @@ command_line = "-m pytest" [tool.tox] legacy_tox_ini = """ [tox] -envlist = py310,py311,py312,py313,py314 +envlist = py312,py313,py314 skip_missing_interpreters = true {% if AddLocalTests -%} [testenv] diff --git a/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionBuild %}build.yml{% endif %}.jinja b/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionBuild %}build.yml{% endif %}.jinja index 9830271d..37796f0f 100644 --- a/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionBuild %}build.yml{% endif %}.jinja +++ b/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionBuild %}build.yml{% endif %}.jinja @@ -17,7 +17,7 @@ jobs: fail-fast: true matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] + python-version: ['3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v6 - name: Set up Python ${{ '{{ ' -}} matrix.python-version }} From f56b44a8fab9061b983bd60d1273c4f14af67b42 Mon Sep 17 00:00:00 2001 From: Sander van Rijn Date: Mon, 8 Dec 2025 13:49:31 +0100 Subject: [PATCH 5/5] Add SPEC 0 badge/reference to main repo --- CHANGELOG.md | 8 +++++--- README.md | 36 ++++++++++++++++++++++-------------- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d9ca70d..1628cd93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Added -* Add Python 3.13 and 3.14 support [#703](https://github.com/NLeSC/python-template/pull/703) +* Now explicitly following [SPEC 0](https://scientific-python.org/specs/spec-0000/), add Python 3.13 and 3.14 support [#703](https://github.com/NLeSC/python-template/pull/703) * Typing support. [#698](https://github.com/NLeSC/python-template/pull/698) ### Changed @@ -16,7 +16,7 @@ * Removed Python 3.10 and 3.11 support -## 0.6.1 +## [0.6.1] ### Added @@ -247,7 +247,9 @@ Released on July 12, 2018. * Requirements.txt * Setup configuration -[Unreleased]: https://github.com/NLeSC/python-template//compare/0.5.0...HEAD +[Unreleased]: https://github.com/NLeSC/python-template//compare/0.6.1...HEAD +[0.5.0]: https://github.com/NLeSC/python-template/releases/tag/0.6.1 +[0.5.0]: https://github.com/NLeSC/python-template/releases/tag/0.6.0 [0.5.0]: https://github.com/NLeSC/python-template/releases/tag/0.5.0 [0.4.0]: https://github.com/NLeSC/python-template/releases/tag/0.4.0 [0.3.0]: https://github.com/NLeSC/python-template/releases/tag/0.3.0 diff --git a/README.md b/README.md index be009ee2..90d3d1fc 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ This fully customizable profile enables you to selectively include or exclude fe - Boilerplate unit tests and documentation, - [Python static setup configuration](template/pyproject.toml.jinja), + - Supporting the 3 most recent Python version, following [SPEC 0] - Open source software license, - Continuous integration with [GitHub action workflows](template/.github/workflows) for building, testing, link checking and linting, - Code style checking with [ruff](https://beta.ruff.rs/), @@ -45,20 +46,20 @@ This fully customizable profile enables you to selectively include or exclude fe ## Badges -| fair-software.nl recommendations | | -| :-- | :-- | -| (1/5) code repository | [![github repo badge](https://img.shields.io/badge/github-repo-000.svg?logo=github&labelColor=gray&color=blue)](https://github.com/nlesc/python-template) | -| (2/5) license | [![github license badge](https://img.shields.io/github/license/nlesc/python-template)](https://github.com/nlesc/python-template) | -| (3/5) community registry | [![RSD](https://img.shields.io/badge/rsd-python--template-00a3e3.svg)](https://research-software.nl/software/nlesc-python-template) | -| (4/5) citation | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1310751.svg)](https://doi.org/10.5281/zenodo.1310751) | -| (5/5) checklist |   | -| overall | [![fair-software badge](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8B-yellow)](https://fair-software.eu) | -| **Other best practices** |   | -|   |   | -| **GitHub Actions** |   | -| Citation metadata consistency | [![cffconvert](https://github.com/nlesc/python-template/actions/workflows/cffconvert.yml/badge.svg)](https://github.com/nlesc/python-template/actions/workflows/cffconvert.yml) | -| Link checker | [![link-check](https://github.com/nlesc/python-template/actions/workflows/link-check.yml/badge.svg)](https://github.com/nlesc/python-template/actions/workflows/link-check.yml) | -| Tests | [![tests](https://github.com/nlesc/python-template/actions/workflows/tests.yml/badge.svg)](https://github.com/nlesc/python-template/actions/workflows/tests.yml) | +| fair-software.nl recommendations | | +|:---------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| (1/5) code repository | [![github repo badge](https://img.shields.io/badge/github-repo-000.svg?logo=github&labelColor=gray&color=blue)](https://github.com/nlesc/python-template) | +| (2/5) license | [![github license badge](https://img.shields.io/github/license/nlesc/python-template)](https://github.com/nlesc/python-template) | +| (3/5) community registry | [![RSD](https://img.shields.io/badge/rsd-python--template-00a3e3.svg)](https://research-software.nl/software/nlesc-python-template) | +| (4/5) citation | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1310751.svg)](https://doi.org/10.5281/zenodo.1310751) | +| (5/5) checklist |   | +| overall | [![fair-software badge](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8B-yellow)](https://fair-software.eu) | +| **Other best practices** |   | +| Dependency support | [![SPEC 0 — Minimum Supported Dependencies][badge-SPEC0]][SPEC 0] | +| **GitHub Actions** |   | +| Citation metadata consistency | [![cffconvert](https://github.com/nlesc/python-template/actions/workflows/cffconvert.yml/badge.svg)](https://github.com/nlesc/python-template/actions/workflows/cffconvert.yml) | +| Link checker | [![link-check](https://github.com/nlesc/python-template/actions/workflows/link-check.yml/badge.svg)](https://github.com/nlesc/python-template/actions/workflows/link-check.yml) | +| Tests | [![tests](https://github.com/nlesc/python-template/actions/workflows/tests.yml/badge.svg)](https://github.com/nlesc/python-template/actions/workflows/tests.yml) | ## How to use @@ -164,3 +165,10 @@ list below: ## How to contribute Suggestions/improvements/edits are most welcome. Please read the [contribution guidelines](CONTRIBUTING.md) before creating an issue or a pull request. + + + + +[badge-SPEC0]: https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811&color=%235CA038 + +[SPEC 0]: https://scientific-python.org/specs/spec-0000/