diff --git a/.agents/project.md b/.agents/project.md index f5bbdd8..6ef4618 100644 --- a/.agents/project.md +++ b/.agents/project.md @@ -11,10 +11,10 @@ | Task | Command | |---|---| -| Install dependencies | `uv sync --group dev --all-extras`, as CI does. `make install` and CONTRIBUTING.md run `uv sync --group dev` without `--all-extras`, and then collection fails in both `tests/unit/` and `tests/integration/`, because they import `grpc_health`. | +| Install dependencies | `make install`: `uv sync --group dev --all-extras`, as CI does. Without `--all-extras`, collection fails in both `tests/unit/` and `tests/integration/`, because they import `grpc_health`. | | Format | `make fmt`: `uv run ruff format .`, then `uv run ruff check --fix .` | | Lint and type-check | `make check`: `uv run ruff check .`, `uv run ruff format --check .`, `uv run mypy grpc_client_kit` | -| Test | `make test-unit` (`uv run pytest -m unit`) and `make test-integration` (`uv run pytest -m integration`). `make test` runs both with `--cov-fail-under=90`. CI runs `uv run pytest -m unit --cov=grpc_client_kit --cov-report=xml --cov-fail-under=90` on Python 3.12 and 3.13, and `uv run pytest -m integration` in a job of its own. | +| Test | `make test-unit` (`uv run pytest -m unit`) and `make test-integration` (`uv run pytest -m integration`). `make test` runs both with `--cov-fail-under=90`. CI runs `uv run pytest -m unit --cov=grpc_client_kit --cov-report=xml --cov-fail-under=90` on Python 3.12, 3.13 and 3.14, and `uv run pytest -m integration` in a job of its own. | | Run locally | A library: nothing to run. An example: `uv run python examples/.py`. Each one starts its own servers on ephemeral ports and exits on its own. The docs: `make docs-serve`. | | Stop the local run | Ctrl+C in the terminal of `make docs-serve`. The examples exit on their own. | @@ -29,7 +29,7 @@ ## Boundaries -- release-please generates `CHANGELOG.md`. Never edit it by hand, and never add an `## [Unreleased]` section, even though the pull request template's checklist asks for one. `docs/changelog.md` is a copy the docs build makes, and git ignores it. +- release-please generates `CHANGELOG.md`. Never edit it by hand, and never add an `## [Unreleased]` section. `docs/changelog.md` is a copy the docs build makes, and git ignores it. - The version lives in `grpc_client_kit/__version__.py`, on the line marked `# x-release-please-version`, and in `.release-please-manifest.json`. release-please bumps both. Never change them by hand. - `docs/agents.md` is part of the public API: it changes in the same pull request as the API, and a new docs page adds a row to its documentation map (CONTRIBUTING.md, "The agents page"). - Files from the engineering-assets hub (`AGENTS.md` explains how it works) include the copy-page files (`docs/assets/javascripts/copy-page.js`, `docs/assets/stylesheets/copy-page.css`, `overrides/main.html`, `scripts/emit_markdown.py`), `.github/workflows/docs.yml`, `.github/workflows/release-please.yml`, `.github/dependabot.yml`, `.editorconfig` and `CODE_OF_CONDUCT.md`. Change them in the hub; a change here makes the file this repository's own. @@ -38,7 +38,7 @@ ## Notes - Releases: release-please opens its pull request with the workflow's own token, so CI does not start on it. Close and reopen the release pull request to run CI, then merge it. `publish.yml` runs after every completed Release Please run on `master`, and it publishes to PyPI when a release tag such as `grpc-client-kit-v0.4.0` points at the commit. Only `feat`, `fix`, `perf` and `revert` appear in the changelog (`release-please-config.json`). -- Tests: every test carries the marker `unit` or `integration`, which `tests/conftest.py` sets from the test's directory (`--strict-markers`). The integration tests start real `grpc.aio` servers in-process on ephemeral ports and need no Docker, although CONTRIBUTING.md says they do. With `asyncio_mode = "auto"`, async tests need no decorator. +- Tests: every test carries the marker `unit` or `integration`, which `tests/conftest.py` sets from the test's directory (`--strict-markers`). The integration tests start real `grpc.aio` servers in-process on ephemeral ports and need no Docker. With `asyncio_mode = "auto"`, async tests need no decorator. - Extras: `import grpc_client_kit` must work on a bare install. Names that need an extra resolve on first access (`__getattr__` in `grpc_client_kit/__init__.py`) and raise an `ImportError` that names the extra. `tests/unit/conftest.py` checks this in a subprocess. - Line endings: `.editorconfig` asks for LF, but the repository has no `.gitattributes`, and some source files are committed with CRLF (`git ls-files --eol`), among them `grpc_client_kit/balancers.py` and `grpc_client_kit/utils.py`. Keep a file's line endings when you edit it. - Code style (CONTRIBUTING.md): type hints on every function, tests included; Google-style docstrings on the public API only; lines up to 120 characters; double quotes; comments only for a non-obvious why. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 03ba0f7..3ba13e0 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1 @@ blank_issues_enabled: false -contact_links: - - name: Question or discussion - url: https://github.com/bedrock-python/grpc-client-kit/discussions - about: Ask a question or start a discussion about grpc-client-kit diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7cdfaa1..8da80f3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -14,7 +14,7 @@ - [ ] Tests added or updated - [ ] `make check` passes locally (`ruff` + `mypy`) -- [ ] `CHANGELOG.md` updated under `[Unreleased]` +- [ ] Conventional-commit title (the changelog is generated by Release Please — do not edit it by hand) - [ ] Documentation updated (if the public API changed), `docs/agents.md` included ## Related issues diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6564ca6..72ffa76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.12", "3.12", "3.13"] + python-version: ["3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v7 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b4996e4..47f7777 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ Thank you for your interest in contributing! This document covers everything you ```bash git clone https://github.com/bedrock-python/grpc-client-kit.git cd grpc-client-kit -uv sync --group dev +uv sync --group dev --all-extras uv run pre-commit install --hook-type commit-msg ``` @@ -16,7 +16,7 @@ uv run pre-commit install --hook-type commit-msg ```bash make check # ruff lint + format check + mypy make test-unit # unit tests, no Docker required -make test-integration # integration tests, requires Docker +make test-integration # integration tests on in-process gRPC servers, no Docker required make test # full suite with 90% coverage threshold ``` diff --git a/Makefile b/Makefile index 718f1fd..0e5a83a 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: test test-unit test-integration fmt check build install docs-serve docs-build clean install: - uv sync --group dev + uv sync --group dev --all-extras fmt: uv run ruff format . diff --git a/pyproject.toml b/pyproject.toml index 79dff82..98b529a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,7 @@ classifiers = [ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed", ]