From 11439b091a8f35055d30c0b9217882e1c00145bf Mon Sep 17 00:00:00 2001 From: Peter Chang Date: Thu, 11 Jun 2026 17:07:10 +0100 Subject: [PATCH 1/3] Prepare for 2.2.0 release Bump up Python version now we use StrEnum, update actions in workflow and switch to use ruff and ignore violations in slurmdb models --- .github/workflows/python-package.yml | 25 ++++++++++++++----------- ParProcCo/slurm/slurmdb_rest.py | 6 ++++-- conda/meta.yaml | 6 +++--- environment.yml | 2 +- pyproject.toml | 2 +- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index d0bc679..29a3553 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -18,29 +18,29 @@ jobs: python-version: ["3.11"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install flake8 parameterized pytest + python -m pip install ruff parameterized pytest if [ -f dev_requirements.txt ]; then pip install -r dev_requirements.txt; else pip install -r requirements.txt; fi - - name: Lint with flake8 + - name: Lint with ruff run: | # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + ruff check . --select=E9,F63,F7,F82 --output-format=full # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + ruff check . --exit-zero --line-length=127 --statistics - name: Test with pytest run: | pytest -vvv tests/ - name: Build sdist and wheel run: pipx run build - name: Upload sdist and wheel as artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: dist path: dist @@ -61,7 +61,10 @@ jobs: steps: # download sdist and wheel from dist job - - uses: actions/download-artifact@v4 - # publish to PyPI using trusted publishing - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - uses: actions/download-artifact@v8 + with: + path: dist + # Publish to PyPI using trusted publishing + - name: Publish to PyPI (v1.14.0) + uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b + diff --git a/ParProcCo/slurm/slurmdb_rest.py b/ParProcCo/slurm/slurmdb_rest.py index c78be1b..d51f94f 100644 --- a/ParProcCo/slurm/slurmdb_rest.py +++ b/ParProcCo/slurm/slurmdb_rest.py @@ -2,10 +2,12 @@ # filename: slurmdb-rest-44.yaml # timestamp: 2026-06-11T15:22:35+00:00 +# ruff: noqa: F405 + from __future__ import annotations -from pydantic import BaseModel, Field, RootModel +from pydantic import BaseModel, Field -from slurm_rest import * +from slurm_rest import * # noqa: F403 class OpenapiSlurmdbdPingResp(BaseModel): errors: OpenapiErrors | None = None diff --git a/conda/meta.yaml b/conda/meta.yaml index 0d1708b..9ffb30a 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,5 +1,5 @@ {% set name = "ParProcCo" %} -{% set version = "2.1.1" %} +{% set version = "2.2.0" %} package: name: {{ name|lower }} @@ -15,11 +15,11 @@ build: requirements: host: - - python >=3.10 + - python >=3.11 - pip - setuptools run: - - python >=3.10 + - python >=3.11 - h5py >=3 - pydantic >=2 - pyyaml diff --git a/environment.yml b/environment.yml index 935b653..2d606e4 100644 --- a/environment.yml +++ b/environment.yml @@ -2,7 +2,7 @@ name: parprocco channels: - conda-forge dependencies: - - python >=3.10 + - python >=3.11 - h5py >=3 - pydantic >=2 - pyyaml diff --git a/pyproject.toml b/pyproject.toml index a1b2dc3..c4ce2b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ "Natural Language :: English", "Programming Language :: Python :: 3 :: Only", ] -requires-python = ">= 3.10" +requires-python = ">= 3.11" dependencies = [ "h5py", "pydantic", From 71fd0b68e019b4519607ceb3e86f4f72417cef78 Mon Sep 17 00:00:00 2001 From: Peter Chang Date: Mon, 15 Jun 2026 09:20:47 +0100 Subject: [PATCH 2/3] Add support for Python versions 3.12 to 3.14 --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 29a3553..bf31600 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.11"] + python-version: ["3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v6 From 34efbf1947c70a5cc7d72ea196209bec047e4e15 Mon Sep 17 00:00:00 2001 From: Peter Chang Date: Mon, 15 Jun 2026 09:31:28 +0100 Subject: [PATCH 3/3] Only upload build of specified version --- .github/workflows/python-package.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index bf31600..1eafea1 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,6 +16,7 @@ jobs: fail-fast: false matrix: python-version: ["3.11", "3.12", "3.13", "3.14"] + upload-version: ["3.11"] steps: - uses: actions/checkout@v6 @@ -40,6 +41,7 @@ jobs: - name: Build sdist and wheel run: pipx run build - name: Upload sdist and wheel as artifacts + if: ${{ matrix.python-version == matrix.upload-version }} uses: actions/upload-artifact@v7 with: name: dist