Skip to content

Commit 26f6837

Browse files
committed
Replace requirements.lock with uv.lock
Similar setup as in aiida-core
1 parent 73f14e3 commit 26f6837

File tree

6 files changed

+1809
-88
lines changed

6 files changed

+1809
-88
lines changed

.github/workflows/benchmarks.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,20 @@ jobs:
2828
uses: actions/setup-python@v5
2929
with:
3030
python-version: 3.8
31-
- name: Install dependencies (including dev dependencies at frozen version)
31+
- name: Set up uv
32+
uses: astral-sh/[email protected]
33+
with:
34+
version: 0.5.22
35+
python-version: ${{ matrix.python-version }}
36+
- name: Install dependencies from uv lock
37+
if: ${{ inputs.from-lock == 'true' }}
38+
# NOTE: We're asserting that the lockfile is up to date
39+
run: uv sync --locked --extra optionaltests
40+
shell: bash
41+
- name: Install disk-objectstore
3242
# I'm using pip install -e to make sure that the coverage properly traces the runs
3343
# also of the concurrent tests (maybe we can achieve this differently)
34-
run: |
35-
python -m pip install --upgrade pip
36-
pip install -e .[optionaltests]
37-
pip install -r requirements.lock
44+
run: uv pip install -e .[optionaltests]
3845
- name: Run benchmarks
3946
run: pytest --benchmark-only --benchmark-json output.json
4047
- name: Store benchmark result

.github/workflows/ci.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,21 @@ jobs:
3939
run: |
4040
.github/workflows/setup-ssh-localhost.sh
4141
ssh -v localhost
42-
- name: Install dependencies (including dev dependencies at frozen version)
42+
43+
- name: Set up uv
44+
uses: astral-sh/[email protected]
45+
with:
46+
version: 0.5.22
47+
python-version: ${{ matrix.python-version }}
48+
- name: Install dependencies from uv lock
49+
if: ${{ inputs.from-lock == 'true' }}
50+
# NOTE: We're asserting that the lockfile is up to date
51+
run: uv sync --locked --extra progressbar --extra optionaltests
52+
shell: bash
53+
- name: Install disk-objectstore
4354
# I'm using pip install -e to make sure that the coverage properly traces the runs
4455
# also of the concurrent tests (maybe we can achieve this differently)
45-
run: |
46-
python -m pip install --upgrade pip
47-
pip install -e .[progressbar,optionaltests]
48-
pip install -r requirements.lock
56+
run: uv pip install -e .[progressbar, optionaltests]
4957
- name: Test with pytest
5058
# No need to run the benchmarks, they will run in a different workflow
5159
# Also, run in very verbose mode so if there is an error we get a complete diff

.github/workflows/concurrency.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,20 @@ jobs:
3030
uses: actions/setup-python@v5
3131
with:
3232
python-version: ${{ matrix.python-version }}
33-
- name: Install dependencies (including dev dependencies at frozen version)
33+
- name: Set up uv
34+
uses: astral-sh/[email protected]
35+
with:
36+
version: 0.5.22
37+
python-version: ${{ matrix.python-version }}
38+
- name: Install dependencies from uv lock
39+
if: ${{ inputs.from-lock == 'true' }}
40+
# NOTE: We're asserting that the lockfile is up to date
41+
run: uv sync --locked --extra optionaltests
42+
shell: bash
43+
- name: Install disk-objectstore
3444
# I'm using pip install -e to make sure that the coverage properly traces the runs
3545
# also of the concurrent tests (maybe we can achieve this differently)
36-
run: |
37-
python -m pip install --upgrade pip
38-
pip install -e .[optionaltests]
39-
pip install -r requirements.lock
46+
run: uv pip install -e .[optionaltests]
4047
- name: Test with pytest
4148
# Run only the concurrency tests, and repeating them 5 times to increase the chance that, if there is an issue
4249
# only happening rarely, we notice it

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,6 @@ commands = pytest {posargs}
139139
description = Run CLI
140140
commands = dostore {posargs}
141141
"""
142+
143+
[tool.uv]
144+
required-version = ">=0.5.21"

requirements.lock

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)