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

Use uv #3

Merged
merged 7 commits into from
Oct 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
15 changes: 6 additions & 9 deletions .github/workflows/publish_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ jobs:
VERSION: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- 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
55 changes: 35 additions & 20 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,64 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- 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
cache-dependency-glob: "uv.lock"
- 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
cache-dependency-glob: "uv.lock"
- 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
cache-dependency-glob: "uv.lock"
- 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
cache-dependency-glob: "uv.lock"
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- run: pip install -e '.[dev]'
- run: make -C docs doctest
python-version-file: "pyproject.toml"
- run: uv sync --all-extras --dev
- run: uv run make -C docs doctest
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ docs:

# Do a dev install.
dev:
pip install -e '.[dev]'
uv sync --all-extras --dev

# Run code checks.
check:
Expand Down Expand Up @@ -48,4 +48,4 @@ fix:

# Build a release.
build:
python -m build
uv build
4 changes: 1 addition & 3 deletions 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 All @@ -22,8 +22,6 @@ dev = [
"pytest-cov",
"sphinx",
"sphinx-copybutton",
"build",
"twine",
"furo",
]

Expand Down
Loading