Skip to content

Commit 238535d

Browse files
author
Callum Dickinson
committed
Switch project to uv
Replace PDM with `uv`, a new Rust-based package and project manager that is PEP-621 and PEP-735 compliant.
1 parent bff3d24 commit 238535d

File tree

7 files changed

+3424
-2008
lines changed

7 files changed

+3424
-2008
lines changed

.github/workflows/tag.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ jobs:
1313
uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 0
16-
- name: Setup Python and PDM
17-
uses: pdm-project/setup-pdm@v4
16+
- name: Setup Python
17+
uses: actions/setup-python@v5
1818
with:
1919
python-version: "3.12"
20-
version: "2.17.1"
20+
cache: "pip"
21+
- name: Setup uv
22+
uses: astral-sh/setup-uv@v6
23+
with:
24+
version: "0.8.3"
2125
- name: Build source dist and wheels
22-
run: pdm build --verbose
26+
run: uv build
2327
- name: Upload source dist and wheels to artifacts
2428
uses: actions/upload-artifact@v4
2529
with:
@@ -44,13 +48,17 @@ jobs:
4448
with:
4549
name: dist
4650
path: dist/
47-
- name: Setup Python and PDM
48-
uses: pdm-project/setup-pdm@v4
51+
- name: Setup Python
52+
uses: actions/setup-python@v5
4953
with:
5054
python-version: "3.12"
51-
version: "2.17.1"
55+
cache: "pip"
56+
- name: Setup uv
57+
uses: astral-sh/setup-uv@v6
58+
with:
59+
version: "0.8.3"
5260
- name: Publish source dist and wheels to PyPI
53-
run: pdm publish --no-build --verbose
61+
run: uv publish
5462

5563
publish-github-release:
5664
needs: build

.github/workflows/test.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ jobs:
2828
uses: actions/checkout@v4
2929
with:
3030
fetch-depth: 0
31-
- name: Setup Python and PDM
32-
uses: pdm-project/setup-pdm@v4
31+
- name: Setup Python
32+
uses: actions/setup-python@v5
3333
with:
3434
python-version: "3.12"
35-
version: "2.17.1"
35+
cache: "pip"
36+
- name: Setup uv
37+
uses: astral-sh/setup-uv@v6
38+
with:
39+
version: "0.8.3"
3640
- name: Build source dist and wheels
37-
run: pdm build --verbose
41+
run: uv build
3842
- name: Upload source dist and wheels to artifacts
3943
uses: actions/upload-artifact@v4
4044
with:

.gitignore

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Byte-compiled / optimized / DLL files
22
__pycache__/
3-
*.py[cod]
3+
*.py[codz]
44
*$py.class
55

66
# C extensions
@@ -46,7 +46,7 @@ htmlcov/
4646
nosetests.xml
4747
coverage.xml
4848
*.cover
49-
*.py,cover
49+
*.py.cover
5050
.hypothesis/
5151
.pytest_cache/
5252
cover/
@@ -94,23 +94,36 @@ ipython_config.py
9494
# install all needed dependencies.
9595
#Pipfile.lock
9696

97+
# UV
98+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
#uv.lock
102+
97103
# poetry
98104
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99105
# This is especially recommended for binary packages to ensure reproducibility, and is more
100106
# commonly ignored for libraries.
101107
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102108
#poetry.lock
109+
#poetry.toml
103110

104111
# pdm
105112
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
106115
#pdm.lock
107-
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108-
# in version control.
109-
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110-
.pdm.toml
116+
#pdm.toml
111117
.pdm-python
112118
.pdm-build/
113119

120+
# pixi
121+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122+
#pixi.lock
123+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124+
# in the .venv directory. It is recommended not to include this directory in version control.
125+
.pixi
126+
114127
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115128
__pypackages__/
116129

@@ -123,6 +136,7 @@ celerybeat.pid
123136

124137
# Environments
125138
.env
139+
.envrc
126140
.venv
127141
env/
128142
venv/
@@ -161,5 +175,29 @@ cython_debug/
161175
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
162176
#.idea/
163177

164-
# VS Code
165-
.vscode
178+
# Abstra
179+
# Abstra is an AI-powered process automation framework.
180+
# Ignore directories containing user credentials, local state, and settings.
181+
# Learn more at https://abstra.io/docs
182+
.abstra/
183+
184+
# Visual Studio Code
185+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
188+
# you could uncomment the following to ignore the entire vscode folder
189+
# .vscode/
190+
191+
# Ruff stuff:
192+
.ruff_cache/
193+
194+
# PyPI configuration file
195+
.pypirc
196+
197+
# Marimo
198+
marimo/_static/
199+
marimo/_lsp/
200+
__marimo__/
201+
202+
# Streamlit
203+
.streamlit/secrets.toml

.pre-commit-config.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
repos:
88
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: "v4.6.0"
9+
rev: "v5.0.0"
1010
hooks:
1111
- id: trailing-whitespace
1212
- id: mixed-line-ending
@@ -15,23 +15,23 @@ repos:
1515
- id: check-added-large-files
1616
- id: check-merge-conflict
1717
- repo: https://github.com/crate-ci/typos
18-
rev: "v1.23.3"
18+
rev: "v1.34.0"
1919
hooks:
2020
- id: typos
21+
- repo: https://github.com/tox-dev/pyproject-fmt
22+
rev: "v2.6.0"
23+
hooks:
24+
- id: pyproject-fmt
25+
- repo: https://github.com/astral-sh/uv-pre-commit
26+
rev: "0.8.3"
27+
hooks:
28+
- id: uv-lock
2129
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: "v0.5.4"
30+
rev: "v0.12.7"
2331
hooks:
24-
- id: ruff
32+
- id: ruff-check
2533
- id: ruff-format
2634
- repo: https://github.com/pre-commit/mirrors-mypy
27-
rev: "v1.11.0"
35+
rev: "v1.17.0"
2836
hooks:
2937
- id: mypy
30-
- repo: https://github.com/tox-dev/pyproject-fmt
31-
rev: "2.1.4"
32-
hooks:
33-
- id: pyproject-fmt
34-
- repo: https://github.com/pdm-project/pdm
35-
rev: "2.17.1"
36-
hooks:
37-
- id: pdm-lock-check

0 commit comments

Comments
 (0)