Skip to content
Open
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
29 changes: 29 additions & 0 deletions .github/workflows/_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,35 @@ jobs:
- run: just install
- run: just test-ci

floors:
# Every other job resolves newest, so the declared floors are a claim nothing installs.
# This one resolves the bottom of each range, on every matrix entry: wheel coverage is
# per interpreter, so two interpreters resolving the same versions can still disagree
# on whether those versions install.
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- run: uv python install ${{ matrix.python-version }}
- run: uv python pin ${{ matrix.python-version }}
# --no-build so a floor with no wheel for this interpreter fails here instead of
# quietly compiling its sdist; --no-install-project because that flag would refuse to
# build this project too, and the tests import it from the checkout.
- run: uv sync --all-extras --no-install-project --resolution lowest-direct --no-build
- run: uv run --no-sync pytest

links:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lint-ci:
# module; rewrite it to a package-relative import so the stubs import cleanly
# as tests.protos.greeter_pb2_grpc.
proto:
uv run python -m grpc_tools.protoc -Itests/protos --python_out=tests/protos --grpc_python_out=tests/protos tests/protos/greeter.proto
uv run --with grpcio-tools python -m grpc_tools.protoc -Itests/protos --python_out=tests/protos --grpc_python_out=tests/protos tests/protos/greeter.proto
sed -i.bak 's/^import greeter_pb2 as greeter__pb2$/from tests.protos import greeter_pb2 as greeter__pb2/' tests/protos/greeter_pb2_grpc.py
rm -f tests/protos/greeter_pb2_grpc.py.bak

Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ classifiers = [
"Topic :: Software Development :: Libraries",
]
dependencies = [
# grpcio ships no cp314 wheel before 1.75.1, so a resolver picks an sdist that cannot build
# rather than reporting a conflict.
"grpcio>=1.48,<2; python_version < '3.14'",
"grpcio>=1.75.1,<2; python_version >= '3.14'",
# The committed test stubs under tests/protos refuse to import below 1.82.1.
"grpcio>=1.82.1,<2",
"modern-di>=3.1,<4",
]
version = "0"
Expand All @@ -34,7 +32,9 @@ Issues = "https://github.com/modern-python/modern-di-grpc/issues"
Changelog = "https://github.com/modern-python/modern-di-grpc/releases"

[dependency-groups]
dev = ["pytest", "pytest-cov", "pytest-asyncio", "grpcio-tools", "protobuf"]
# Floored so `uv sync --resolution lowest-direct` resolves a usable harness, not each name's first release.
# grpcio-tools is not here: it pins grpcio to its own version, which would hide the floors above.
dev = ["pytest>=8", "pytest-cov>=5", "pytest-asyncio>=0.24", "protobuf>=7.35"]
lint = ["ty", "ruff", "eof-fixer", "typing-extensions"]

[build-system]
Expand Down
Loading