From f802d5ccfbde22056f417986211b3164e9f23610 Mon Sep 17 00:00:00 2001 From: Eelco van Vliet Date: Thu, 2 Oct 2025 18:36:48 +0200 Subject: [PATCH 1/7] removed local prettier, back to github node --- .pre-commit-config.yaml | 10 ++++------ package-lock.json | 32 -------------------------------- package.json | 28 ---------------------------- 3 files changed, 4 insertions(+), 66 deletions(-) delete mode 100644 package-lock.json delete mode 100644 package.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 76ad8fe..7e0761d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v6.0.0 hooks: - id: check-case-conflict - id: check-merge-conflict @@ -16,12 +16,10 @@ repos: args: [--exit-non-zero-on-fix] - id: ruff-format - - repo: local + - repo: https://github.com/JoC0de/pre-commit-prettier + rev: v3.6.2 hooks: - id: prettier - name: prettier - entry: npx --no-install prettier --write - language: system - pass_filenames: true + args: ["--write"] types_or: [javascript, jsx, ts, tsx, json, markdown, yaml, css, scss, html] diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index a234e87..0000000 --- a/package-lock.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "python-build-utils", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "python-build-utils", - "version": "1.0.0", - "license": "ISC", - "devDependencies": { - "prettier": "^3.6.2" - } - }, - "node_modules/prettier": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", - "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index e2bd52f..0000000 --- a/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "python-build-utils", - "version": "1.0.0", - "description": "[![GitHub Release](https://img.shields.io/github/v/release/dave-Lab-and-Engineering/python-build-utils)](https://github.com/dave-Lab-and-Engineering/python-build-utils/releases/tag/0.1.1) [![PyPI Version](https://img.shields.io/pypi/v/python-build-utils)](https://pypi.org/project/python-build-utils/) [![Build Status](https://img.shields.io/github/actions/workflow/status/dave-Lab-and-Engineering/python-build-utils/main.yml?branch=main)](https://github.com/dave-Lab-and-Engineering/python-build-utils/actions/workflows/main.yml) [![codecov](https://codecov.io/gh/dave-Lab-and-Engineering/python-build-utils/branch/main/graph/badge.svg)](https://codecov.io/gh/dave-Lab-and-Engineering/python-build-utils) [![Commit Activity](https://img.shields.io/github/commit-activity/m/dave-Lab-and-Engineering/python-build-utils)](https://github.com/dave-Lab-and-Engineering/python-build-utils/commits/main) [![License](https://img.shields.io/github/license/dave-Lab-and-Engineering/python-build-utils)](https://github.com/dave-Lab-and-Engineering/python-build-utils/blob/main/LICENSE)", - "main": "index.js", - "directories": { - "doc": "docs", - "example": "examples", - "test": "tests" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/dave-Lab-and-Engineering/python-build-utils.git" - }, - "keywords": [], - "author": "", - "license": "ISC", - "bugs": { - "url": "https://github.com/dave-Lab-and-Engineering/python-build-utils/issues" - }, - "homepage": "https://github.com/dave-Lab-and-Engineering/python-build-utils#readme", - "devDependencies": { - "prettier": "^3.6.2" - } -} From 8b0778c34126860e6ec7e908efc5260c4913761f Mon Sep 17 00:00:00 2001 From: Eelco van Vliet Date: Thu, 2 Oct 2025 18:36:48 +0200 Subject: [PATCH 2/7] updated pre commit hook --- .pre-commit-config.yaml | 10 ++++------ package.json | 28 ---------------------------- 2 files changed, 4 insertions(+), 34 deletions(-) delete mode 100644 package.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 76ad8fe..7e0761d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v6.0.0 hooks: - id: check-case-conflict - id: check-merge-conflict @@ -16,12 +16,10 @@ repos: args: [--exit-non-zero-on-fix] - id: ruff-format - - repo: local + - repo: https://github.com/JoC0de/pre-commit-prettier + rev: v3.6.2 hooks: - id: prettier - name: prettier - entry: npx --no-install prettier --write - language: system - pass_filenames: true + args: ["--write"] types_or: [javascript, jsx, ts, tsx, json, markdown, yaml, css, scss, html] diff --git a/package.json b/package.json deleted file mode 100644 index e2bd52f..0000000 --- a/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "python-build-utils", - "version": "1.0.0", - "description": "[![GitHub Release](https://img.shields.io/github/v/release/dave-Lab-and-Engineering/python-build-utils)](https://github.com/dave-Lab-and-Engineering/python-build-utils/releases/tag/0.1.1) [![PyPI Version](https://img.shields.io/pypi/v/python-build-utils)](https://pypi.org/project/python-build-utils/) [![Build Status](https://img.shields.io/github/actions/workflow/status/dave-Lab-and-Engineering/python-build-utils/main.yml?branch=main)](https://github.com/dave-Lab-and-Engineering/python-build-utils/actions/workflows/main.yml) [![codecov](https://codecov.io/gh/dave-Lab-and-Engineering/python-build-utils/branch/main/graph/badge.svg)](https://codecov.io/gh/dave-Lab-and-Engineering/python-build-utils) [![Commit Activity](https://img.shields.io/github/commit-activity/m/dave-Lab-and-Engineering/python-build-utils)](https://github.com/dave-Lab-and-Engineering/python-build-utils/commits/main) [![License](https://img.shields.io/github/license/dave-Lab-and-Engineering/python-build-utils)](https://github.com/dave-Lab-and-Engineering/python-build-utils/blob/main/LICENSE)", - "main": "index.js", - "directories": { - "doc": "docs", - "example": "examples", - "test": "tests" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/dave-Lab-and-Engineering/python-build-utils.git" - }, - "keywords": [], - "author": "", - "license": "ISC", - "bugs": { - "url": "https://github.com/dave-Lab-and-Engineering/python-build-utils/issues" - }, - "homepage": "https://github.com/dave-Lab-and-Engineering/python-build-utils#readme", - "devDependencies": { - "prettier": "^3.6.2" - } -} From 54a8134f658373f6c682fd97e165fbf82e33f180 Mon Sep 17 00:00:00 2001 From: Eelco van Vliet Date: Fri, 3 Oct 2025 05:09:42 +0000 Subject: [PATCH 3/7] removed docker, not needed --- .devcontainer/postCreateCommand.sh | 0 Dockerfile | 21 --------------------- 2 files changed, 21 deletions(-) mode change 100644 => 100755 .devcontainer/postCreateCommand.sh delete mode 100644 Dockerfile diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh old mode 100644 new mode 100755 diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index b946c89..0000000 --- a/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -# Install uv -FROM python:3.12-slim -COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv - -# Change the working directory to the `app` directory -WORKDIR /app - -# Copy the lockfile and `pyproject.toml` into the image -ADD uv.lock /app/uv.lock -ADD pyproject.toml /app/pyproject.toml - -# Install dependencies -RUN uv sync --frozen --no-install-project - -# Copy the project into the image -ADD . /app - -# Sync the project -RUN uv sync --frozen - -CMD [ "python", "python_build_utils/__main__.py"] From 83ed3341c1d2449f743d726894be19d5f3d31c03 Mon Sep 17 00:00:00 2001 From: Eelco van Vliet Date: Fri, 3 Oct 2025 05:10:02 +0000 Subject: [PATCH 4/7] update postcreatecommand --- .devcontainer/postCreateCommand.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index 9a52875..3630956 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -1,11 +1,17 @@ -#! /usr/bin/env bash +#!/usr/bin/env bash +set -euo pipefail # Install uv curl -LsSf https://astral.sh/uv/install.sh | sh -source $HOME/.cargo/env -# Install Dependencies -uv sync +# Install binary to /usr/local/bin +if [ -x "$HOME/.local/bin/uv" ]; then + sudo install -m 0755 "$HOME/.local/bin/uv" /usr/local/bin/uv +elif [ -x "$HOME/.cargo/bin/uv" ]; then + sudo install -m 0755 "$HOME/.cargo/bin/uv" /usr/local/bin/uv +fi + +uv --version -# Install pre-commit hooks -uv run pre-commit install --install-hooks +uv sync +uv run pre-commit install --install-hooks --overwrite From f29f10155bff5caaab8f0a8854bb139ee51344c5 Mon Sep 17 00:00:00 2001 From: Eelco van Vliet Date: Fri, 3 Oct 2025 05:18:40 +0000 Subject: [PATCH 5/7] added tox --- .devcontainer/postCreateCommand.sh | 2 +- pyproject.toml | 1 + uv.lock | 92 ++++++++++++++++++++++++------ 3 files changed, 76 insertions(+), 19 deletions(-) diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index 3630956..879985e 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -13,5 +13,5 @@ fi uv --version -uv sync +uv sync --dev uv run pre-commit install --install-hooks --overwrite diff --git a/pyproject.toml b/pyproject.toml index cfb77f0..bbc7fd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ dev = [ "codecov>=2.1.13", "setuptools>=79.0.0", "cython>=3.0.12", + "tox>=4.30.3", ] [project.scripts] diff --git a/uv.lock b/uv.lock index b59abab..c0d8bc6 100644 --- a/uv.lock +++ b/uv.lock @@ -11,6 +11,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b7/b8/3fe70c75fe32afc4bb507f75563d39bc5642255d1d94f1f23604725780bf/babel-2.17.0-py3-none-any.whl", hash = "sha256:4d0b53093fdfb4b21c92b5213dba5a1b23885afa8383709427046b21c366e5f2", size = 10182537, upload-time = "2025-02-01T15:17:37.39Z" }, ] +[[package]] +name = "cachetools" +version = "6.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9d/61/e4fad8155db4a04bfb4734c7c8ff0882f078f24294d42798b3568eb63bff/cachetools-6.2.0.tar.gz", hash = "sha256:38b328c0889450f05f5e120f56ab68c8abaf424e1275522b138ffc93253f7e32", size = 30988, upload-time = "2025-08-25T18:57:30.924Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6c/56/3124f61d37a7a4e7cc96afc5492c78ba0cb551151e530b54669ddd1436ef/cachetools-6.2.0-py3-none-any.whl", hash = "sha256:1c76a8960c0041fcc21097e357f882197c79da0dbff766e7317890a65d7d8ba6", size = 11276, upload-time = "2025-08-25T18:57:29.684Z" }, +] + [[package]] name = "certifi" version = "2025.1.31" @@ -29,6 +38,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c5/55/51844dd50c4fc7a33b653bfaba4c2456f06955289ca770a5dbd5fd267374/cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9", size = 7249, upload-time = "2023-08-12T20:38:16.269Z" }, ] +[[package]] +name = "chardet" +version = "5.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz", hash = "sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7", size = 2069618, upload-time = "2023-08-01T19:23:02.662Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/38/6f/f5fbc992a329ee4e0f288c1fe0e2ad9485ed064cac731ed2fe47dcc38cbf/chardet-5.2.0-py3-none-any.whl", hash = "sha256:e1cf59446890a00105fe7b7912492ea04b6e6f06d4b742b2c788469e34c82970", size = 199385, upload-time = "2023-08-01T19:23:00.661Z" }, +] + [[package]] name = "charset-normalizer" version = "3.4.1" @@ -299,11 +317,11 @@ wheels = [ [[package]] name = "filelock" -version = "3.17.0" +version = "3.19.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/dc/9c/0b15fb47b464e1b663b1acd1253a062aa5feecb07d4e597daea542ebd2b5/filelock-3.17.0.tar.gz", hash = "sha256:ee4e77401ef576ebb38cd7f13b9b28893194acc20a8e68e18730ba9c0e54660e", size = 18027, upload-time = "2025-01-21T20:04:49.099Z" } +sdist = { url = "https://files.pythonhosted.org/packages/40/bb/0ab3e58d22305b6f5440629d20683af28959bf793d98d11950e305c1c326/filelock-3.19.1.tar.gz", hash = "sha256:66eda1888b0171c998b35be2bcc0f6d75c388a7ce20c3f3f37aa8e96c2dddf58", size = 17687, upload-time = "2025-08-14T16:56:03.016Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/89/ec/00d68c4ddfedfe64159999e5f8a98fb8442729a63e2077eb9dcd89623d27/filelock-3.17.0-py3-none-any.whl", hash = "sha256:533dc2f7ba78dc2f0f531fc6c4940addf7b70a481e269a5a3b93be94ffbe8338", size = 16164, upload-time = "2025-01-21T20:04:47.734Z" }, + { url = "https://files.pythonhosted.org/packages/42/14/42b2651a2f46b022ccd948bca9f2d5af0fd8929c4eec235b8d6d844fbe67/filelock-3.19.1-py3-none-any.whl", hash = "sha256:d38e30481def20772f5baf097c122c3babc4fcdb7e14e57049eb9d88c6dc017d", size = 15988, upload-time = "2025-08-14T16:56:01.633Z" }, ] [[package]] @@ -645,11 +663,11 @@ wheels = [ [[package]] name = "packaging" -version = "24.2" +version = "25.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f", size = 163950, upload-time = "2024-11-08T09:47:47.202Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", size = 65451, upload-time = "2024-11-08T09:47:44.722Z" }, + { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" }, ] [[package]] @@ -694,20 +712,20 @@ wheels = [ [[package]] name = "platformdirs" -version = "4.3.6" +version = "4.4.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907", size = 21302, upload-time = "2024-09-17T19:06:50.688Z" } +sdist = { url = "https://files.pythonhosted.org/packages/23/e8/21db9c9987b0e728855bd57bff6984f67952bea55d6f75e055c46b5383e8/platformdirs-4.4.0.tar.gz", hash = "sha256:ca753cf4d81dc309bc67b0ea38fd15dc97bc30ce419a7f58d13eb3bf14c4febf", size = 21634, upload-time = "2025-08-26T14:32:04.268Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3c/a6/bc1012356d8ece4d66dd75c4b9fc6c1f6650ddd5991e421177d9f8f671be/platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb", size = 18439, upload-time = "2024-09-17T19:06:49.212Z" }, + { url = "https://files.pythonhosted.org/packages/40/4b/2028861e724d3bd36227adfa20d3fd24c3fc6d52032f4a93c133be5d17ce/platformdirs-4.4.0-py3-none-any.whl", hash = "sha256:abd01743f24e5287cd7a5db3752faf1a2d65353f38ec26d98e25a6db65958c85", size = 18654, upload-time = "2025-08-26T14:32:02.735Z" }, ] [[package]] name = "pluggy" -version = "1.5.0" +version = "1.6.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1", size = 67955, upload-time = "2024-04-20T21:34:42.531Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669", size = 20556, upload-time = "2024-04-20T21:34:40.434Z" }, + { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, ] [[package]] @@ -748,6 +766,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/eb/f5/b9e2a42aa8f9e34d52d66de87941ecd236570c7ed2e87775ed23bbe4e224/pymdown_extensions-10.14.3-py3-none-any.whl", hash = "sha256:05e0bee73d64b9c71a4ae17c72abc2f700e8bc8403755a00580b49a4e9f189e9", size = 264467, upload-time = "2025-02-01T15:43:13.995Z" }, ] +[[package]] +name = "pyproject-api" +version = "1.9.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "packaging" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/19/fd/437901c891f58a7b9096511750247535e891d2d5a5a6eefbc9386a2b41d5/pyproject_api-1.9.1.tar.gz", hash = "sha256:43c9918f49daab37e302038fc1aed54a8c7a91a9fa935d00b9a485f37e0f5335", size = 22710, upload-time = "2025-05-12T14:41:58.025Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/e6/c293c06695d4a3ab0260ef124a74ebadba5f4c511ce3a4259e976902c00b/pyproject_api-1.9.1-py3-none-any.whl", hash = "sha256:7d6238d92f8962773dd75b5f0c4a6a27cce092a14b623b811dba656f3b628948", size = 13158, upload-time = "2025-05-12T14:41:56.217Z" }, +] + [[package]] name = "pytest" version = "8.3.4" @@ -832,6 +863,7 @@ dev = [ { name = "pytest-pretty" }, { name = "ruff" }, { name = "setuptools" }, + { name = "tox" }, ] [package.metadata] @@ -866,6 +898,7 @@ dev = [ { name = "pytest-pretty", specifier = ">=1.2.0" }, { name = "ruff", specifier = ">=0.9.2" }, { name = "setuptools", specifier = ">=79.0.0" }, + { name = "tox", specifier = ">=4.30.3" }, ] [[package]] @@ -1129,6 +1162,28 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/6e/c2/61d3e0f47e2b74ef40a68b9e6ad5984f6241a942f7cd3bbfbdbd03861ea9/tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc", size = 14257, upload-time = "2024-11-27T22:38:35.385Z" }, ] +[[package]] +name = "tox" +version = "4.30.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cachetools" }, + { name = "chardet" }, + { name = "colorama" }, + { name = "filelock" }, + { name = "packaging" }, + { name = "platformdirs" }, + { name = "pluggy" }, + { name = "pyproject-api" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, + { name = "virtualenv" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/51/b2/cee55172e5e10ce030b087cd3ac06641e47d08a3dc8d76c17b157dba7558/tox-4.30.3.tar.gz", hash = "sha256:f3dd0735f1cd4e8fbea5a3661b77f517456b5f0031a6256432533900e34b90bf", size = 202799, upload-time = "2025-10-02T16:24:39.974Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e2/e4/8bb9ce952820df4165eb34610af347665d6cb436898a234db9d84d093ce6/tox-4.30.3-py3-none-any.whl", hash = "sha256:a9f17b4b2d0f74fe0d76207236925a119095011e5c2e661a133115a8061178c9", size = 175512, upload-time = "2025-10-02T16:24:38.209Z" }, +] + [[package]] name = "types-setuptools" version = "75.8.0.20250210" @@ -1140,11 +1195,11 @@ wheels = [ [[package]] name = "typing-extensions" -version = "4.12.2" +version = "4.15.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", size = 85321, upload-time = "2024-06-07T18:52:15.995Z" } +sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", size = 37438, upload-time = "2024-06-07T18:52:13.582Z" }, + { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, ] [[package]] @@ -1158,16 +1213,17 @@ wheels = [ [[package]] name = "virtualenv" -version = "20.29.2" +version = "20.34.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "distlib" }, { name = "filelock" }, { name = "platformdirs" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f1/88/dacc875dd54a8acadb4bcbfd4e3e86df8be75527116c91d8f9784f5e9cab/virtualenv-20.29.2.tar.gz", hash = "sha256:fdaabebf6d03b5ba83ae0a02cfe96f48a716f4fae556461d180825866f75b728", size = 4320272, upload-time = "2025-02-10T19:03:53.117Z" } +sdist = { url = "https://files.pythonhosted.org/packages/1c/14/37fcdba2808a6c615681cd216fecae00413c9dab44fb2e57805ecf3eaee3/virtualenv-20.34.0.tar.gz", hash = "sha256:44815b2c9dee7ed86e387b842a84f20b93f7f417f95886ca1996a72a4138eb1a", size = 6003808, upload-time = "2025-08-13T14:24:07.464Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/93/fa/849483d56773ae29740ae70043ad88e068f98a6401aa819b5d6bee604683/virtualenv-20.29.2-py3-none-any.whl", hash = "sha256:febddfc3d1ea571bdb1dc0f98d7b45d24def7428214d4fb73cc486c9568cce6a", size = 4301478, upload-time = "2025-02-10T19:03:48.221Z" }, + { url = "https://files.pythonhosted.org/packages/76/06/04c8e804f813cf972e3262f3f8584c232de64f0cde9f703b46cf53a45090/virtualenv-20.34.0-py3-none-any.whl", hash = "sha256:341f5afa7eee943e4984a9207c025feedd768baff6753cd660c857ceb3e36026", size = 5983279, upload-time = "2025-08-13T14:24:05.111Z" }, ] [[package]] From 1152bdf1ee82f252cbc9cbf209beb09efabf1272 Mon Sep 17 00:00:00 2001 From: Eelco van Vliet Date: Fri, 3 Oct 2025 05:29:59 +0000 Subject: [PATCH 6/7] updated uv version --- .github/actions/setup-python-env/action.yml | 2 +- .github/workflows/main.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-python-env/action.yml b/.github/actions/setup-python-env/action.yml index 36c64a8..9b090dd 100644 --- a/.github/actions/setup-python-env/action.yml +++ b/.github/actions/setup-python-env/action.yml @@ -9,7 +9,7 @@ inputs: uv-version: description: "uv version to use" required: true - default: "0.5.20" + default: "0.8.22" runs: using: "composite" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4895f45..f2ca8f3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,6 +6,7 @@ on: - main pull_request: types: [opened, synchronize, reopened, ready_for_review] + workflow_dispatch: jobs: quality: From 9cb457087f1ab9b6b5417d56d670b9c24fbd3e1a Mon Sep 17 00:00:00 2001 From: Eelco van Vliet Date: Fri, 3 Oct 2025 05:47:08 +0000 Subject: [PATCH 7/7] fixed token --- .github/workflows/main.yml | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f2ca8f3..a5a6be9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,6 +8,11 @@ on: types: [opened, synchronize, reopened, ready_for_review] workflow_dispatch: +# Required for Codecov OIDC uploads and generally safe defaults +permissions: + contents: read + id-token: write + jobs: quality: runs-on: ubuntu-latest @@ -44,25 +49,44 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Show tool versions (debug) + run: | + python --version + uv --version + - name: Run tests run: uv run python -m pytest tests --cov --cov-config=pyproject.toml --cov-report=xml --junitxml=junit.xml - name: Check typing run: uv run mypy - - name: Upload coverage reports to Codecov (only for 3.11) - if: ${{ matrix.python-version == '3.11' }} + # --- Codecov upload (only Python 3.11) --- + # Upload coverage only when it's NOT a fork PR (tokenless/OIDC upload). + - name: Upload coverage to Codecov (3.11, non-fork) + if: ${{ matrix.python-version == '3.11' && (github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork) }} uses: codecov/codecov-action@v4 with: - token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml fail_ci_if_error: true + # Uses GitHub OIDC; no token required for non-fork runs. + use_oidc: true - - name: Upload test results to Codecov (only for 3.11) - if: ${{ matrix.python-version == '3.11' && !cancelled() }} + # Save coverage as artifact on fork PRs (no upload attempt to avoid permission issues). + - name: Save coverage artifact (3.11, fork PR) + if: ${{ matrix.python-version == '3.11' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }} + uses: actions/upload-artifact@v4 + with: + name: coverage-${{ matrix.python-version }} + path: coverage.xml + + # Optional test results upload to Codecov (skip on forks to avoid tokenless failure). + - name: Upload test results to Codecov (3.11, non-fork) + if: ${{ matrix.python-version == '3.11' && (github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork) && !cancelled() }} uses: codecov/test-results-action@v1 with: - token: ${{ secrets.CODECOV_TOKEN }} + # This action can work without a token on trusted runs; if you prefer token, you can add it here. + # token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true check-docs: runs-on: ubuntu-latest