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
16 changes: 16 additions & 0 deletions .github/workflows/_ty.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
on:
workflow_call:

jobs:
ty:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@v7

- name: Run ty
run: |
uv run --frozen ty check
20 changes: 12 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,25 @@ on:
pull_request:

jobs:
pre-commit:
prek:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
- uses: pre-commit/action@v3.0.1
- uses: j178/prek-action@v1
permissions:
contents: read

ty:
uses: ./.github/workflows/_ty.yml
permissions:
contents: read

test:
needs: pre-commit
needs: [prek, ty]
strategy:
matrix:
# runs-on: ["ubuntu-latest", "windows-latest", "macos-latest"]
runs-on: ["ubuntu-latest"] # Linux for now
# python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] # test multiple Python versions
python-version: ["3.14"] # test multiple Python versions, TODO: add all versions back in once we have CI working for 3.14
runs-on: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ["3.12", "3.13", "3.14"] # test multiple Python versions
fail-fast: false
uses: ./.github/workflows/_test.yml
with:
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.14
3.12
22 changes: 5 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@ authors = [{ name = "Niko Kivel", email = "niko.kivel@lightsource.ca" }]
dynamic = ["version"]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
requires-python = ">=3.11,<3.15"
requires-python = ">=3.12,<3.15"
readme = "README.md"
dependencies = []

[dependency-groups]
dev = [
"ruff",
"pyright[nodejs] !=1.1.401, !=1.1.407",
"pre-commit",
"pytest >=6",
"pytest-cov >=3",
Expand All @@ -31,6 +29,7 @@ dev = [
"redis>=7.2.0",
"nats-py>=2.14.0",
"asyncpg>=0.30.0",
"ty>=0.0.20",
]
docs = [
"sphinx !=4.1.0,!=4.1.1,!=4.1.2,!=4.2.0",
Expand All @@ -42,21 +41,10 @@ docs = [

[tool.uv]
managed = true
[tool.pyright]
# see https://github.com/microsoft/pyright/blob/main/docs/configuration.md
pythonVersion = "3.14"
include = ["kv_dict"]

[tool.ty.src]
include = ["src/bluesky_nats", "tests"]
exclude = ["**/__pycache__"]
typeCheckingMode = "standard"
# many of these checks are also handled by Ruff (as warnings)
reportDeprecated = "error"
reportDuplicateImport = "warning"
reportMissingSuperCall = "warning"
reportUninitializedInstanceVariable = "error"
reportUnusedCallResult = "warning"
reportUnusedExpression = "error"
reportMatchNotExhaustive = "error"
reportImplicitOverride = "error"

[tool.ruff]
# see https://docs.astral.sh/ruff
Expand Down
2 changes: 1 addition & 1 deletion tests/test_redis_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def __init__(self) -> None:
self.store: dict[str, str] = {}
self.closed = False

async def get(self, key: str) -> str | None:
async def get(self, key: str) -> str | bytes | None:
return self.store.get(key)

async def set(self, key: str, value: str) -> None:
Expand Down
2 changes: 2 additions & 0 deletions tests/test_remote_mapping.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import TYPE_CHECKING


Expand Down
338 changes: 50 additions & 288 deletions uv.lock

Large diffs are not rendered by default.

Loading