Skip to content
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
56 changes: 26 additions & 30 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,17 @@ jobs:
with:
persist-credentials: false

- name: Install Poetry
run: pipx install poetry

- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
cache: poetry
enable-cache: true

- name: Install dependencies
run: poetry install
run: uv sync --frozen

- name: Run mypy
run: poetry run mypy .
run: uv run mypy .


nix-flake:
runs-on: ubuntu-24.04
Expand All @@ -49,15 +47,13 @@ jobs:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v16

- name: Cache Nix
uses: DeterminateSystems/magic-nix-cache-action@v9

- name: Build package
run: nix build

- name: Run command
run: nix run


pre-commit:
runs-on: ubuntu-24.04

Expand All @@ -73,40 +69,41 @@ jobs:
- name: Run pre-commit
uses: pre-commit/action@v3.0.1


pytest:
runs-on: ubuntu-24.04

strategy:
fail-fast: false
matrix:
package-resolution:
- --frozen
- --resolution=lowest
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14-dev"
- "3.14"

steps:
- name: Checkout the code
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install Poetry
run: pipx install poetry

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
cache: poetry

- name: Install dependencies
run: poetry install
run: uv sync ${{ matrix.package-resolution }}

- name: Run pytest
run: poetry run pytest
run: uv run pytest


usage:
runs-on: ubuntu-24.04
Expand All @@ -117,21 +114,20 @@ jobs:
with:
persist-credentials: false

- name: Install Poetry
run: pipx install poetry

- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
cache: poetry
enable-cache: true

- name: Install dependencies
run: poetry install
run: uv sync --frozen

- name: Generate usage.md
run: uv run ./generate-usage.sh

- name: Check usage.md is up-to-date
run: |
poetry run ./generate-usage.sh
git diff --exit-code
run: git diff --exit-code


all-checks-passed:
if: always()
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/release-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@ jobs:
with:
persist-credentials: false

- name: Install Poetry
run: pipx install poetry

- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: false

- name: Install dependencies
run: poetry install
run: uv sync --frozen

- name: Build package
run: poetry build
run: uv build

- name: Attest
uses: actions/attest-build-provenance@v2
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ Development
-----------

The code base is fully type annotated and test coverage is being enforced.
Types can be checked via `poetry run mypy .` and tests via `poetry run pytest`.
Types can be checked via `uv run mypy .` and tests via `uv run pytest`.

Tests are run for each of the supported Python versions in CI.

[pre-commit](https://pre-commit.com/) used to run Ruff for linting and formatting.

`usage.md` is updated via `poetry run ./generate-usage.sh`.
`usage.md` is updated via `uv run ./generate-usage.sh`.
106 changes: 47 additions & 59 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading