diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a0ef2fcf..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'] + 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 cd6043fa..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'] + 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 ec7d3e4d..1628cd93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,15 +4,19 @@ ### Added -- Typing support. [#698](https://github.com/NLeSC/python-template/pull/698) +* 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 +* 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 -## 0.6.1 +* Removed Python 3.10 and 3.11 support + +## [0.6.1] ### Added @@ -243,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/ diff --git a/setup.cfg b/setup.cfg index f82fc793..eb229698 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,9 +12,9 @@ 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 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 @@ -28,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 f5baf308..d19a8e2d 100644 --- a/template/project_setup.md.jinja +++ b/template/project_setup.md.jinja @@ -11,9 +11,9 @@ 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 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..09ec7e88 100644 --- a/template/pyproject.toml.jinja +++ b/template/pyproject.toml.jinja @@ -24,9 +24,9 @@ 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", ] dependencies = [] description = "{{ package_short_description|replace('\"', '\\\"') }}" @@ -38,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] @@ -106,7 +106,7 @@ command_line = "-m pytest" [tool.tox] legacy_tox_ini = """ [tox] -envlist = py310,py311,py312 +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 4bddbb36..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'] + python-version: ['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: | 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