|
9 | 9 | - Workflow definitions are in `.github/workflows/`; adjust only when CI |
10 | 10 | requirements change. |
11 | 11 | - Documentation and contributor notes reside at the repo root (`README.md`, |
12 | | - `AGENTS.md`). |
| 12 | + `AGENTS.md`). Automation sessions live in `noxfile.py`; keep shared task logic |
| 13 | + there. |
13 | 14 |
|
14 | 15 | ## Build, Test, and Development Commands |
15 | 16 |
|
|
19 | 20 | pushing. |
20 | 21 | - `uv run pytest` — execute the suite with the active interpreter. |
21 | 22 | - `uv build` — produce wheels and sdists identical to the release workflow. |
| 23 | +- `uvx nox -s tests` — create matrix virtualenvs via nox and execute the pytest |
| 24 | + session. |
22 | 25 |
|
23 | 26 | ## Coding Style & Naming Conventions |
24 | 27 |
|
25 | | -- Target Python 3.9–3.13; use 4-space indentation and type hints for public |
| 28 | +- Target Python 3.10–3.14; use 4-space indentation and type hints for public |
26 | 29 | APIs. |
27 | 30 | - Black + isort (via ruff) enforce formatting; run through pre-commit prior to |
28 | 31 | review. |
29 | 32 | - Use `snake_case` for functions/modules, `PascalCase` for classes, and |
30 | 33 | `UPPER_SNAKE_CASE` for constants. |
31 | 34 | - Prefer `pathlib`, f-strings, and other modern stdlib features—pyupgrade rules |
32 | 35 | will flag legacy code. |
| 36 | +- When calling pdfRest, supply the API key via the `Api-Key` header (not |
| 37 | + `Authorization: Bearer`); keep tests and client defaults in sync with this |
| 38 | + convention. |
33 | 39 |
|
34 | 40 | ## Testing Guidelines |
35 | 41 |
|
36 | 42 | - Write pytest tests: files named `test_*.py`, test functions `test_*`, fixtures |
37 | 43 | in `conftest.py` where shared. |
38 | 44 | - Ensure high-value coverage of public functions and edge cases; document intent |
39 | 45 | in test docstrings when non-obvious. |
40 | | -- For interpreter compatibility, execute the matrix locally: |
41 | | - ```bash |
42 | | - for py in 3.9 3.10 3.11 3.12 3.13; do |
43 | | - UV_PROJECT_ENVIRONMENT=.venv-$py uv sync --group dev --python $py |
44 | | - UV_PROJECT_ENVIRONMENT=.venv-$py uv run --python $py pytest |
45 | | - done |
46 | | - ``` |
| 46 | +- Use `uvx nox -s tests` to exercise the full interpreter matrix locally when |
| 47 | + validating compatibility. |
47 | 48 |
|
48 | 49 | ## Commit & Pull Request Guidelines |
49 | 50 |
|
|
59 | 60 | ## CI & Publishing Notes |
60 | 61 |
|
61 | 62 | - GitHub Actions run two workflows: `pre-commit` (no AWS credentials) and |
62 | | - `Test and Publish` (Python 3.9–3.13 matrix). |
| 63 | + `Test and Publish` (Python 3.10–3.14 matrix). |
63 | 64 | - Only the release job assumes the AWS OIDC role to `uv build` and publish with |
64 | | - `uv tool run --from twine twine upload`. |
| 65 | + `uv publish`. |
65 | 66 | - Keep CodeArtifact credentials out of source control; day-to-day development |
66 | 67 | should rely solely on public dependencies. |
0 commit comments