Skip to content

Commit 61ba4c7

Browse files
authored
migrate to uv (#5)
1 parent 542686f commit 61ba4c7

File tree

6 files changed

+508
-1237
lines changed

6 files changed

+508
-1237
lines changed

.github/workflows/python-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: arduino/setup-task@v1
2222
with:
2323
repo-token: ${{ github.token }}
24-
- run: pip install poetry
24+
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
2525
- run: task install lint-ci
2626

2727
pytest:
@@ -41,5 +41,5 @@ jobs:
4141
- uses: arduino/setup-task@v1
4242
with:
4343
repo-token: ${{ github.token }}
44-
- run: pip install poetry
44+
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
4545
- run: task install tests

Taskfile.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
11
version: "3"
22

33
tasks:
4+
lock:
5+
desc: "lock with update"
6+
cmds:
7+
- uv lock --upgrade
8+
49
install:
510
desc: "install local dependencies"
611
cmds:
7-
- poetry install --sync --no-root --all-extras
12+
- uv sync --all-extras --frozen
813

914
lint:
1015
desc: "run linters"
1116
cmds:
12-
- poetry run ruff format .
13-
- poetry run ruff check . --fix
14-
- poetry run mypy .
17+
- uv run ruff format .
18+
- uv run ruff check . --fix
19+
- uv run mypy .
1520

1621
lint-ci:
1722
desc: "run linters"
1823
cmds:
19-
- poetry run ruff format . --check
20-
- poetry run ruff check . --no-fix
21-
- poetry run mypy .
24+
- uv run ruff format . --check
25+
- uv run ruff check . --no-fix
26+
- uv run mypy .
2227

2328
tests:
2429
desc: "run pytest (pass args after '--')"
2530
cmds:
26-
- poetry run pytest {{.CLI_ARGS}}
31+
- uv run pytest {{.CLI_ARGS}}
2732

2833
release:
2934
desc: "bump version, create tag and release, publish to PYPI"
@@ -34,7 +39,7 @@ tasks:
3439
- poetry version {{.CLI_ARGS}}
3540
- git add pyproject.toml
3641
- git commit -m "bump version to {{.CLI_ARGS}}"
37-
- poetry build
42+
- uvx --from build pyproject-build --installer uv
3843
- twine upload dist/*
3944
- git tag {{.CLI_ARGS}}
4045
- git push

0 commit comments

Comments
 (0)