Skip to content

Commit 3bc1513

Browse files
docs, coverage: Add internal classes to function coverage checks
- Updated `AGENTS.md` to specify that underscore-prefixed methods in key client-facing classes (`_FilesClient`, `_AsyncFilesClient`) are in scope for function coverage checks. - Expanded `DEFAULT_COVERAGE_CLASSES` in `noxfile.py` to include the files client classes. - Updated `test-and-publish.yml` CI workflow to cover the files client classes. Assisted-by: Codex
1 parent dad187e commit 3bc1513

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/test-and-publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ jobs:
5959
coverage/py${{ matrix.python-version }}/coverage.json
6060
--class PdfRestClient
6161
--class AsyncPdfRestClient
62+
--class _FilesClient
63+
--class _AsyncFilesClient
6264
--fail-under 90
6365
--markdown-report coverage/py${{ matrix.python-version }}/class-function-coverage.md
6466
- name: Upload coverage reports

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@
146146
Optional payload branches (`pages`, `output`, `rgb_color`, etc.) need explicit
147147
coverage so serialization regressions are caught.
148148

149+
- **Class function coverage scope:** The class coverage gate targets the main
150+
client-facing classes (`PdfRestClient`, `AsyncPdfRestClient`, `_FilesClient`,
151+
`_AsyncFilesClient`). For these classes, underscore-prefixed methods are
152+
intentionally in scope and should be covered as part of the interface
153+
contract.
154+
149155
- Write pytest tests: files named `test_*.py`, test functions `test_*`, fixtures
150156
in `conftest.py` where shared.
151157

noxfile.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717
PROJECT_ROOT = Path(__file__).resolve().parent
1818
DEFAULT_EXAMPLE_PYTHON = "3.11"
1919
EXAMPLES_DIR = PROJECT_ROOT / "examples"
20-
DEFAULT_COVERAGE_CLASSES = ("PdfRestClient", "AsyncPdfRestClient")
20+
DEFAULT_COVERAGE_CLASSES = (
21+
"PdfRestClient",
22+
"AsyncPdfRestClient",
23+
"_FilesClient",
24+
"_AsyncFilesClient",
25+
)
2126

2227

2328
def _install_test_dependencies(session: nox.Session) -> None:

0 commit comments

Comments
 (0)