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
26 changes: 24 additions & 2 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,31 @@ jobs:
run: uv run prek run --show-diff-on-failure --color=always --all-files --hook-stage pre-push


ty:
runs-on: ubuntu-latest
name: Type check (ty)
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false

- name: Install uv
uses: astral-sh/setup-uv@b75dde52aef63a238519e7aecbbe79a4a52e4315 # v7
with:
enable-cache: true
version: ${{ env.UV_VERSION }}

- name: Install dependencies
run: uv sync --all-groups

- name: Run ty
run: uv run ty check --output-format github ./src/plexosdb

pytest:
name: Tests ${{ matrix.os }} / py${{ matrix.python }}
needs: prek
needs: [prek, ty]
runs-on: ${{ matrix.os }}
permissions:
contents: read
Expand Down Expand Up @@ -84,7 +106,7 @@ jobs:

benchmarks:
name: Benchmarks
needs: prek
needs: [prek, ty]
runs-on: ubuntu-latest
continue-on-error: true
permissions:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ venv.bak/
.dmypy.json
dmypy.json

# ty
.ty_cache/

# Pyre type checker
.pyre/

Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ repos:

- repo: local
hooks:
- id: mypy
name: mypy
entry: uv run mypy --config-file=pyproject.toml ./src/plexosdb
- id: ty
name: ty
entry: uv run ty check ./src/plexosdb
language: system
types: [python]
pass_filenames: false
12 changes: 9 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ docs = [
]
dev = [
"ipython>=9.2.0",
"mypy>=1.15.0",
"prek>=0.3.3",
"ty>=0.0.23",
"pytest>=8.3.5",
"pytest-benchmark>=5.1.0",
"pytest-coverage>=0.0",
Expand All @@ -80,10 +80,16 @@ include-package-data = true
[tool.setuptools.packages.find]
where = ["src"]

[tool.mypy]
strict = true
[tool.ty.src]
include = ["src/plexosdb"]
exclude = ["tests/"]

[tool.ty.environment]
python-version = "3.11"

[tool.ty.terminal]
output-format = "full"

[tool.ruff]
line-length = 110
target-version = "py311"
Expand Down
Loading
Loading