From c47ba40b78f21976cb7afdf45ba71b54828374e2 Mon Sep 17 00:00:00 2001 From: Liam Keegan Date: Mon, 3 Feb 2025 09:10:37 +0100 Subject: [PATCH] use dev dependency-group in CI - use `test-groups` instead of `test-requires` for cibuildwheel - temporary workaround to install dev dependency-group using uvx until pip adds support - can later be removed and instead adding `--group dev` or similar to the pip install command (https://github.com/pypa/pip/pull/13065) - use build.verbose instead of deprecated cmake.verbose - remove no longer used requirements-dev.txt --- .github/workflows/release.yml | 5 ++++- pyproject.toml | 6 +++--- requirements-dev.txt | 1 - 3 files changed, 7 insertions(+), 5 deletions(-) delete mode 100644 requirements-dev.txt diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46292d1..db9a5d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -146,6 +146,8 @@ jobs: with: python-version: '3.13' + - uses: astral-sh/setup-uv@v5 + - uses: actions/download-artifact@v4 with: name: artifacts-sdist @@ -157,7 +159,8 @@ jobs: - name: Install test requirements run: - python -m pip install -r requirements-dev.txt + # temporary workaround until pip supports installing dependency-groups: + uvx dependency-groups dev | xargs python -m pip install - name: Set up Git identity run: | diff --git a/pyproject.toml b/pyproject.toml index d0607af..fbb0124 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,11 +39,11 @@ wheel.packages = ["clang_format"] wheel.py-api = "py2.py3" cmake.version = ">=3.16.0" ninja.version = ">=1.10.0" -cmake.verbose = true +build.verbose = true logging.level = "DEBUG" [dependency-groups] -dev = ["pytest"] +dev = ["pytest", "pytest-git"] [tool.cibuildwheel] # Super-verbose output for debugging purpose @@ -52,9 +52,9 @@ build-verbosity = 3 environment = "CMAKE_GENERATOR=Ninja" # Testing commands for our wheels +test-groups = ["dev"] before-test = [ "git config --global user.name Name", "git config --global user.email foo@bar.com" ] -test-requires = ["pytest", "pytest-git"] test-command = "pytest {package}/test" diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index e079f8a..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1 +0,0 @@ -pytest