Skip to content

Commit bbd6628

Browse files
committed
Switch from uv to pdm
1 parent 339c39f commit bbd6628

9 files changed

Lines changed: 774 additions & 499 deletions

File tree

.github/workflows/format.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,16 @@ jobs:
1414
- name: Checkout
1515
uses: actions/checkout@v6
1616

17-
- name: Setup Python
18-
uses: actions/setup-python@v6
17+
- name: Setup PDM
18+
uses: pdm-project/setup-pdm@v4
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121

22-
- name: Install uv
23-
uses: astral-sh/setup-uv@v7
24-
with:
25-
version: "0.11.7"
26-
2722
- name: Install just
2823
uses: extractions/setup-just@v4
2924

3025
- name: Install optional
31-
run: uv sync --all-extras
26+
run: pdm install -G dev
3227

3328
- name: Run Formatter
3429
run: just format

.github/workflows/lint.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,16 @@ jobs:
1414
- name: Checkout
1515
uses: actions/checkout@v6
1616

17-
- name: Setup Python
18-
uses: actions/setup-python@v6
17+
- name: Setup PDM
18+
uses: pdm-project/setup-pdm@v4
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121

22-
- name: Install uv
23-
uses: astral-sh/setup-uv@v7
24-
with:
25-
version: "0.11.7"
26-
27-
- name: Install Just
22+
- name: Install just
2823
uses: extractions/setup-just@v4
2924

3025
- name: Install optional
31-
run: uv sync --all-extras
26+
run: pdm install -G dev
3227

3328
- name: Run Linter
3429
run: just lint

.github/workflows/test.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,16 @@ jobs:
1414
- name: Checkout
1515
uses: actions/checkout@v6
1616

17-
- name: Setup Python
18-
uses: actions/setup-python@v6
17+
- name: Setup PDM
18+
uses: pdm-project/setup-pdm@v4
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121

22-
- name: Install uv
23-
uses: astral-sh/setup-uv@v7
24-
with:
25-
version: "0.11.7"
26-
2722
- name: Install just
2823
uses: extractions/setup-just@v4
2924

3025
- name: Install optional
31-
run: uv sync --all-extras
26+
run: pdm install -G dev
3227

3328
- name: Run Unit Tests
3429
run: just test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ wheels/
1111

1212
# Coverage
1313
.coverage
14+
15+
# PDM files
16+
.pdm-python

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,16 @@ There is complete test coverage and they pass in all Python versions 3.10 and up
171171

172172
### Running Unit Tests
173173

174-
First, install `uv` using the instructions located [here](https://docs.astral.sh/uv/getting-started/installation).
174+
First, install `pdm` using the instructions located [here](https://pdm-project.org/en/latest/#installation).
175175

176176
Then, install the requirements using:
177177

178178
```bash
179-
uv sync --all-extras
179+
pdm install -G dev
180180
```
181181

182182
You can run the tests (with coverage) using:
183183

184184
```bash
185-
uv run pytest
185+
pdm run pytest
186186
```

justfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ commands:
55
# Run unit tests
66
[group('test')]
77
test:
8-
@uv run python -m pytest
8+
@pdm run python -m pytest
99

1010
# Lint source code
1111
[parallel, group('dev')]
@@ -14,17 +14,17 @@ lint: lint-ruff lint-basedpyright
1414
# Lint code using ruff
1515
[private, group('dev')]
1616
lint-ruff:
17-
@uv run python -m ruff check src tests
17+
@pdm run python -m ruff check src tests
1818

1919
# Lint code using basedpyright
2020
[private, group('dev')]
2121
lint-basedpyright:
22-
@uv run python -m basedpyright src tests
22+
@pdm run python -m basedpyright src tests
2323

2424
# Format code using ruff
2525
[group('dev')]
2626
format:
27-
@uv run python -m ruff format src tests
27+
@pdm run python -m ruff format src tests
2828

2929
# Check for editorconfig violations using editorconfig-checker
3030
[group('dev')]

pdm.lock

Lines changed: 749 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ requires-python = ">= 3.10"
1313
dependencies = []
1414

1515
[build-system]
16-
requires = ["uv_build>=0.11.0,<0.12.0"]
17-
build-backend = "uv_build"
16+
requires = ["hatchling"]
17+
build-backend = "hatchling.build"
1818

19-
[dependency-groups]
19+
[project.optional-dependencies]
2020
dev = [
2121
"basedpyright>=1.31.7",
2222
"coverage>=7.10.7",
@@ -27,8 +27,8 @@ dev = [
2727
"typing-extensions>=4.15.0",
2828
]
2929

30-
[tool.uv.build-backend]
31-
module-name = "optional"
30+
[tool.hatch.build.targets.wheel]
31+
packages = ["src/optional"]
3232

3333
[tool.pytest.ini_options]
3434
addopts = "--cov=optional"

uv.lock

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

0 commit comments

Comments
 (0)