From 655af1bbb5f2228d47c060231e22eabe7fa87191 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Thu, 19 Dec 2024 16:17:26 +0100 Subject: [PATCH 1/3] CI: Use uv's resolution=lowest strategy in one of the jobs --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cf58c4..e07c8a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,11 +17,12 @@ jobs: strategy: matrix: python-version: ['3.9', '3.10', '3.11', '3.12'] - aiida-version-spec: ['>=2.5'] - # Include a job with minimum supported aiida-version + resolution: ['highest'] + # Include a job with minimum supported aiida-version, + # achieved via uv's resolution strategy include: - python-version: '3.9' - aiida-version-spec: '==2.1' + resolution: 'lowest-direct' fail-fast: false services: @@ -55,7 +56,7 @@ jobs: with: version: ${{ env.UV_VER }} - name: Install package - run: uv pip install --system -e .[tests] "aiida-core${{ matrix.aiida-version-spec }}" + run: uv pip install --resolution ${{ matrix.resolution }} --system -e .[tests] - name: Run test suite env: From 8ed065f9fcd32a27d3c0e85a8289bfc3544167dc Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Thu, 19 Dec 2024 16:28:47 +0100 Subject: [PATCH 2/3] Add minimum versions for pytest-datadir and pytest-mock --- .github/workflows/ci.yml | 3 ++- pyproject.toml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e07c8a1..4634ae8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,8 @@ jobs: python-version: ['3.9', '3.10', '3.11', '3.12'] resolution: ['highest'] # Include a job with minimum supported aiida-version, - # achieved via uv's resolution strategy + # achieved via uv's resolution strategy, see: + # https://docs.astral.sh/uv/reference/settings/#resolution include: - python-version: '3.9' resolution: 'lowest-direct' diff --git a/pyproject.toml b/pyproject.toml index e923cda..6e29606 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,8 +51,8 @@ docs = ["sphinx", "sphinx-rtd-theme"] tests = [ "pgtest~=1.3.1", "aiida-diff~=2.0.0", - "pytest-datadir", - "pytest-mock", + "pytest-datadir~=1.4", + "pytest-mock~=3.11", "pytest-cov>=4.0", ] pre_commit = [ From b18fa974546ce3768fe468e6d57c805cb4b27783 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Sun, 5 Jan 2025 14:28:49 +0100 Subject: [PATCH 3/3] Update uv version --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4634ae8..22dde4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: - main pull_request: env: - UV_VER: "0.5.6" + UV_VER: "0.5.14" FORCE_COLOR: 1 jobs: @@ -53,7 +53,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Set up uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v5 with: version: ${{ env.UV_VER }} - name: Install package @@ -87,7 +87,7 @@ jobs: python-version: '3.12' - name: Set up uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v5 with: version: ${{ env.UV_VER }}