From 641b0e2c37acf8cfd8bb366ec69a0282242ca363 Mon Sep 17 00:00:00 2001 From: AlexeyShalaev <75322386+AlexeyShalaev@users.noreply.github.com> Date: Wed, 7 Oct 2026 16:48:43 +0300 Subject: [PATCH] chore: fix the contributor docs, templates and CI - PR template: replace the "CHANGELOG.md updated under [Unreleased]" item with a Conventional Commit title item; release-please writes the changelog. - Issue template config: drop the Discussions contact link, as Discussions are disabled, and the empty contact_links key. - CI: test on Python 3.14 too (3.12 to 3.14) and add the 3.14 classifier. - make install and CONTRIBUTING.md: sync with --all-extras, as CI does; mypy needs pydantic for its plugin. - CONTRIBUTING.md: the integration tests run an in-process server and need no Docker. - CI: the integration job no longer accepts pytest's exit code 5 (no tests collected). - Project profile: drop the notes about the fixed mismatches. --- .agents/project.md | 8 ++++---- .github/ISSUE_TEMPLATE/config.yml | 4 ---- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/ci.yml | 9 ++------- CONTRIBUTING.md | 4 ++-- Makefile | 2 +- pyproject.toml | 1 + 7 files changed, 11 insertions(+), 19 deletions(-) diff --git a/.agents/project.md b/.agents/project.md index 064a3be..04c637c 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 leave out `--all-extras`. Without it, `mypy` cannot load the `pydantic.mypy` plugin and 13 test modules fail at collection. | +| Install dependencies | `make install`: `uv sync --group dev --all-extras`, as CI does. Without `--all-extras`, `mypy` cannot load the `pydantic.mypy` plugin and 13 test modules fail at collection. | | 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_server_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_server_kit --cov-report=xml --cov-fail-under=90` on Python 3.12 and 3.13, and runs `uv run pytest -m integration` in a separate job. | +| 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_server_kit --cov-report=xml --cov-fail-under=90` on Python 3.12, 3.13 and 3.14, and runs `uv run pytest -m integration` in a separate job. | | Run locally | A library: nothing to run. Each script in `examples/` starts a server and exits on its own, for example `uv run python examples/minimal_server.py`. The docs: `make docs-serve`. | | Stop the local run | Ctrl+C in the terminal of `make docs-serve`. The examples stop by themselves. | @@ -29,7 +29,7 @@ ## Boundaries -- `CHANGELOG.md` is generated by release-please. 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 an untracked copy that the docs build makes. +- `CHANGELOG.md` is generated by release-please. Never edit it by hand, and never add an `## [Unreleased]` section. `docs/changelog.md` is an untracked copy that the docs build makes. - The version lives in two places: `grpc_server_kit/__version__.py`, on the line marked `# x-release-please-version`, and `.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 each new docs page adds a row to its documentation map (CONTRIBUTING.md, "The agents page"). - Some files come from the engineering-assets hub (`AGENTS.md` explains how it works): @@ -43,7 +43,7 @@ ## Notes - Releases: release-please opens its pull request with the workflow's own token, so CI does not start on it and the required `All checks passed` check never reports. Close and reopen the release pull request to run CI, then merge it. When the Release Please run completes, `publish.yml` publishes the `grpc-server-kit-vX.Y.Z` tag to PyPI. Before 1.0, a breaking change bumps the minor version. -- Tests: every test carries the marker `unit` or `integration` (`--strict-markers`). `tests/conftest.py` sets the marker by directory, and each module also declares `pytestmark`. The tests in `tests/integration/` start a real `grpc.aio` server in the same process on `127.0.0.1`. They need no Docker, although CONTRIBUTING.md says they do. +- Tests: every test carries the marker `unit` or `integration` (`--strict-markers`). `tests/conftest.py` sets the marker by directory, and each module also declares `pytestmark`. The tests in `tests/integration/` start a real `grpc.aio` server in the same process on `127.0.0.1`. They need no Docker. - Test style (CONTRIBUTING.md): - one behaviour per test; - Arrange, Act, Assert, in that order; diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 3dcc16e..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-server-kit/discussions - about: Ask a question or start a discussion about grpc-server-kit diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 5073550..1a7034a 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 10dcac9..7d228cf 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.13"] + python-version: ["3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v7 @@ -49,12 +49,7 @@ jobs: - uses: astral-sh/setup-uv@v7 - run: uv sync --group dev --all-extras - name: Run integration tests - run: | - set +e - uv run pytest -m integration - STATUS=$? - set -e - test $STATUS -eq 0 -o $STATUS -eq 5 + run: uv run pytest -m integration # Sentinel job — use this as the single required status check in branch protection. all-checks-passed: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eaf4bd8..7423883 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-server-kit.git cd grpc-server-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, in-process gRPC server, no Docker required make test # full suite with 90% coverage threshold ``` diff --git a/Makefile b/Makefile index 5faca11..6209682 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 ca5919b..067c7df 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", ]