Skip to content

Commit 70d6969

Browse files
committed
refactor: replace poetry with uv
1 parent 6bd324b commit 70d6969

11 files changed

Lines changed: 1241 additions & 1241 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,63 +10,67 @@ jobs:
1010
build:
1111
name: Build
1212
runs-on: ubuntu-24.04
13+
env:
14+
PYTHON_VERSION: 3.13
15+
UV_VERSION: 0.11.13
1316

1417
steps:
1518
- name: Checkout repository
16-
uses: actions/checkout@v6
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1720

18-
- name: Setup Python
19-
uses: actions/setup-python@v6
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
2023
with:
21-
python-version: "3.13"
24+
enable-cache: true
25+
version: ${{ env.UV_VERSION }}
2226

23-
- name: Install Poetry
24-
uses: snok/install-poetry@v1
27+
- name: "Set up Python"
28+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # 6.1.0
29+
with:
30+
python-version: ${{ env.PYTHON_VERSION }}
2531

2632
- name: Install dependencies
27-
run: poetry install
33+
run: uv sync --locked --all-extras --dev
2834

2935
- name: Lint
30-
run: poetry run black --check .
36+
run: uv run ruff check .
3137

3238
- name: Build
33-
run: poetry build
39+
run: uv build
3440

35-
# the `coverage xml -i` command is needed to re-write the
36-
# coverage report with relative paths
3741
- name: Test
38-
run: |
39-
poetry run pytest --cov src --cov-report xml tests
40-
poetry run coverage xml -i
42+
run: uv run pytest
4143

4244
test:
4345
name: Test
4446
runs-on: ubuntu-24.04
4547
strategy:
4648
fail-fast: false
4749
matrix:
48-
python-version: ["3.10", "3.11", "3.12", "3.13"]
49-
poetry-version: ["1.8.2"]
50+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
51+
env:
52+
UV_PYTHON: ${{ matrix.python-version }}
5053

5154
steps:
5255
- name: Checkout repository
53-
uses: actions/checkout@v6
56+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5457

55-
- name: Setup python
56-
uses: actions/setup-python@v6
58+
- name: Install uv
59+
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
5760
with:
58-
python-version: "${{ matrix.python-version }}"
61+
enable-cache: true
62+
version: ${{ env.UV_VERSION }}
5963

60-
- name: Install Poetry
61-
uses: snok/install-poetry@v1
64+
- name: Setup python
65+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # 6.1.0
6266
with:
63-
version: "${{ matrix.poetry-version }}"
67+
python-version: "${{ matrix.python-version }}"
6468

6569
- name: Install dependencies
66-
run: poetry install
70+
run: uv sync --locked --all-extras --dev
6771

6872
- name: Build
69-
run: poetry build
73+
run: uv build
7074

7175
- name: Test
72-
run: poetry run tox
76+
run: uv run pytest

.github/workflows/codeql-analysis.yml

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

.github/workflows/fortify.yml

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

.github/workflows/publish.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,24 @@ jobs:
99
name: Deploy to package index
1010
runs-on: ubuntu-24.04
1111
env:
12-
PYTHON_VERSION: "3.12"
13-
REPOSITORY_USERNAME: ${{ secrets.PYPI_USERNAME }}
14-
REPOSITORY_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
12+
PYTHON_VERSION: 3.13
13+
UV_VERSION: 0.11.13
14+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_PASSWORD }}
1515
REPOSITORY_URL: ${{ secrets.PYPI_PUBLISH_URL }}
1616
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
1717
CONDA_ENV_NAME: conda-env
1818

1919
steps:
2020
- name: Checkout repository
21-
uses: actions/checkout@v6
21+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22+
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
25+
with:
26+
version: ${{ env.UV_VERSION }}
2227

2328
- name: Setup Python
24-
uses: actions/setup-python@v6
29+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # 6.1.0
2530
with:
2631
python-version: ${{ env.PYTHON_VERSION }}
2732

@@ -32,21 +37,13 @@ jobs:
3237
activate-environment: ${{ env.CONDA_ENV_NAME }}
3338
python-version: ${{ env.PYTHON_VERSION }}
3439

35-
- name: Install Poetry
36-
uses: snok/install-poetry@v1
37-
38-
- name: Configure Poetry
39-
run: |
40-
poetry config repositories.publish $REPOSITORY_URL
41-
poetry config http-basic.publish $REPOSITORY_USERNAME $REPOSITORY_PASSWORD
42-
4340
- name: Build
4441
run: |
45-
poetry build
42+
uv build
4643
4744
- name: Publish
4845
run: |
49-
poetry publish -r publish
46+
uv publish
5047
5148
- name: Publish to Anaconda
5249
shell: bash -el {0}

0 commit comments

Comments
 (0)