Skip to content

Commit b5be8a4

Browse files
authored
Migrate to uv (#38)
* Update pyproject.toml for uv * Integrate tox with uv * Update Makefile commands * Update remaining references to poetry * Add workaround to calculate package version for docs * Remove `make update-dependencies` * trigger CI
1 parent 679eaad commit b5be8a4

18 files changed

+132
-120
lines changed

.github/workflows/python-code-style.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ jobs:
2121
uses: actions/setup-python@v5
2222
with:
2323
python-version: "3.13"
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v6
2426
- name: Install dependencies
2527
run: |
26-
python -m pip install --upgrade pip
27-
python -m pip install poetry tox
28-
make poetry-export
28+
make dev-dependencies
2929
- name: Check code style with black
3030
run: |
3131
make format

.github/workflows/python-lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
uses: actions/setup-python@v5
2222
with:
2323
python-version: "3.13"
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v6
2426
- name: Install dependencies
2527
run: |
26-
python -m pip install --upgrade pip
27-
python -m pip install poetry tox
28-
make poetry-export
28+
make dev-dependencies
2929
- name: Lint with ruff
3030
run: make lint

.github/workflows/python-quality.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@ jobs:
2121
uses: actions/setup-python@v5
2222
with:
2323
python-version: "3.13"
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v6
2426
- name: Install dependencies
2527
run: |
26-
python -m pip install --upgrade pip
27-
python -m pip install poetry
28-
poetry config virtualenvs.create false
29-
poetry install --no-root --with dev
28+
make dev-dependencies
3029
- name: Test & publish code coverage
3130
uses: paambaati/[email protected]
3231
env:

.github/workflows/python-tests.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ jobs:
2828
uses: actions/setup-python@v5
2929
with:
3030
python-version: "${{ matrix.version }}"
31+
- name: Install uv
32+
uses: astral-sh/setup-uv@v6
3133
- name: Install dependencies
3234
run: |
33-
python -m pip install --upgrade pip
34-
python -m pip install poetry
35-
poetry config virtualenvs.create false
36-
poetry install --no-root --with dev
35+
make dev-dependencies
3736
- name: Test with pytest
3837
id: citest
3938
run: |
@@ -68,7 +67,7 @@ jobs:
6867
--body "$BODY")
6968
if [[ $PINNED == true ]]; then
7069
gh issue pin "$new_issue_url"
71-
fi
70+
fi
7271
fi
7372
env:
7473
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/python-typing.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
uses: actions/setup-python@v5
2222
with:
2323
python-version: "3.13"
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v6
2426
- name: Install dependencies
2527
run: |
26-
python -m pip install --upgrade pip
27-
python -m pip install poetry tox
28-
make poetry-export
28+
make dev-dependencies
2929
- name: Check typing
3030
run: make typing

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ jobs:
2222
with:
2323
python-version: "3.13"
2424

25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v6
2527
- name: Install dependencies
2628
run: |
27-
python -m pip install --upgrade pip
28-
python -m pip install poetry poetry-dynamic-versioning
29+
make dev-dependencies
2930
3031
- name: Build package
3132
run: |
32-
poetry build
33+
uv build
3334
3435
- name: Archive the dist folder
3536
uses: actions/upload-artifact@v4

.github/workflows/reusable-github-pages.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,11 @@ jobs:
4646

4747
# Here we want to install the current package in editable mode,
4848
# in case mkdocs needs the package (i.e. we are building a mkdocs plugin).
49+
- name: Install uv
50+
uses: astral-sh/setup-uv@v6
4951
- name: Install dependencies
5052
run: |
51-
python -m pip install --upgrade pip
52-
python -m pip install poetry
53-
poetry config virtualenvs.create false
54-
poetry install --with dev
53+
make dev-dependencies
5554
5655
- name: Configure Git user
5756
run: |
@@ -64,12 +63,12 @@ jobs:
6463
6564
- name: Build and deploy static pages
6665
run: |
67-
mike deploy ${{ inputs.site-version }} ${{ inputs.version-alias }} --update-aliases --push --branch ${{ inputs.branch }}
66+
uv run mike deploy ${{ inputs.site-version }} ${{ inputs.version-alias }} --update-aliases --push --branch ${{ inputs.branch }}
6867
6968
- name: Set default site version
7069
if: ${{ inputs.set-default }}
7170
run: |
72-
mike set-default ${{ inputs.site-version }} --push --branch ${{ inputs.branch }}
71+
uv run mike set-default ${{ inputs.site-version }} --push --branch ${{ inputs.branch }}
7372
7473
# `mike` is specifically built to be used together with GitHub pages.
7574
# To upload the website to another service (i.e. AWS S3) uncomment

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,5 @@ dmypy.json
282282

283283
# Cython debug symbols
284284
cython_debug/
285-
poetry.lock
285+
uv.lock
286+
version.py

.idea/bootstrap-python-package.iml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)