Skip to content

Commit

Permalink
Use uv
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasturcani committed Oct 31, 2024
1 parent 57031fc commit 133b529
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 30 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/publish_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@ jobs:
VERSION: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- run: pip install -e '.[dev]'
- run: python -m build
- run:
twine upload
-u __token__
-p ${{ secrets.PYPI_API_TOKEN }}
dist/*
python-version-file: "pyproject.toml"
- run: uv publish
48 changes: 29 additions & 19 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,59 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- run: pip install -e '.[dev]'
- run: ruff check src/ tests/ docs/source/ examples/
python-version-file: "pyproject.toml"
- run: uv sync --all-extras --dev
- run: uv run ruff check src/ tests/ docs/source/ examples/
mypy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- run: pip install -e '.[dev]'
- run: mypy src/ tests/ docs/source/ examples/
python-version-file: "pyproject.toml"
- run: uv sync --all-extras --dev
- run: uv run mypy src/ tests/ docs/source/ examples/
ruff-format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- run: pip install -e '.[dev]'
- run: ruff format --check src/ tests/ docs/source/ examples/
python-version-file: "pyproject.toml"
- run: uv sync --all-extras --dev
- run: uv run ruff format --check src/ tests/ docs/source/ examples/
pytest:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- run: pip install -e '.[dev]'
- run: pytest --cov=src --cov-report term-missing
python-version-file: "pyproject.toml"
- run: uv sync --all-extras --dev
- run: uv run pytest --cov=src --cov-report term-missing
doctest:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- run: pip install -e '.[dev]'
python-version-file: "pyproject.toml"
- run: uv sync --all-extras --dev
- run: make -C docs doctest
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ fix:

# Build a release.
build:
python -m build
uv build
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ maintainers = [
]

dependencies = []
requires-python = ">=3.11"
requires-python = ">=3.13"
dynamic = ["version"]
readme = "README.rst"
description = "Does things for you."
Expand Down

0 comments on commit 133b529

Please sign in to comment.