Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate to uv #5

Merged
merged 1 commit into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: arduino/setup-task@v1
with:
repo-token: ${{ github.token }}
- run: pip install poetry
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: task install lint-ci

pytest:
Expand All @@ -41,5 +41,5 @@ jobs:
- uses: arduino/setup-task@v1
with:
repo-token: ${{ github.token }}
- run: pip install poetry
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: task install tests
23 changes: 14 additions & 9 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
version: "3"

tasks:
lock:
desc: "lock with update"
cmds:
- uv lock --upgrade

install:
desc: "install local dependencies"
cmds:
- poetry install --sync --no-root --all-extras
- uv sync --all-extras --frozen

lint:
desc: "run linters"
cmds:
- poetry run ruff format .
- poetry run ruff check . --fix
- poetry run mypy .
- uv run ruff format .
- uv run ruff check . --fix
- uv run mypy .

lint-ci:
desc: "run linters"
cmds:
- poetry run ruff format . --check
- poetry run ruff check . --no-fix
- poetry run mypy .
- uv run ruff format . --check
- uv run ruff check . --no-fix
- uv run mypy .

tests:
desc: "run pytest (pass args after '--')"
cmds:
- poetry run pytest {{.CLI_ARGS}}
- uv run pytest {{.CLI_ARGS}}

release:
desc: "bump version, create tag and release, publish to PYPI"
Expand All @@ -34,7 +39,7 @@ tasks:
- poetry version {{.CLI_ARGS}}
- git add pyproject.toml
- git commit -m "bump version to {{.CLI_ARGS}}"
- poetry build
- uvx --from build pyproject-build --installer uv
- twine upload dist/*
- git tag {{.CLI_ARGS}}
- git push
Expand Down
Loading
Loading