Thanks for contributing to pdfrest.
- Install project tooling:
uv sync --group dev- (Recommended) install git hooks:
uv run pre-commit install- Verify package import/version:
uv run python -c "import pdfrest; print(pdfrest.__version__)"When asking Codex to add a documented pdfRest endpoint or a compatible parameter
to an existing endpoint, begin the prompt with the repository-local
$pdfrest-client-api skill. Include the Jira work item key when one exists. The
PDFCloud-API checkout and its documented OpenAPI operation must be available
before using the skill. Prefer adding the neighboring PDFCloud-API directory to
the Codex project so the skill can read the contract directly. For example:
$pdfrest-client-api PDFCLOUD-6233: Add the documented PDFCloud-API operation
for ...
The skill uses the PDFCloud-API OpenAPI specification as the contract; keeps the sync and async clients aligned; puts wire serialization and validation in Pydantic payload models; preserves existing caller behavior; and requires focused unit coverage plus matching live endpoint tests. It also handles the versioning required for a newly added public API.
Run these before opening a PR:
uv run ruff format .
uv run ruff check .
uv run basedpyrightQuick local run:
uv run pytest -n auto --maxschedchunk 2Full interpreter matrix with coverage artifacts (coverage/py<version>/):
uvx nox -s testsClass/function coverage gate for client classes:
uvx nox -s class-coverageTo reuse existing coverage JSON without rerunning tests:
uvx nox -s class-coverage -- --no-testsLive tests require PDFREST_API_KEY. By default, the test fixture tries the
local service, the development service, and then the production service. To run
against a specific reachable pdfRest deployment first, set
PDFREST_LIVE_BASE_URL to its base URL:
export PDFREST_API_KEY="..."
export PDFREST_LIVE_BASE_URL="https://pdfrest.example.com"
uvx nox -s tests-3.11 -- tests/liveIf that URL is unavailable, the fixture continues with its normal fallback URLs and fails only when none are reachable.
Run all examples:
uvx nox -s examplesRun one example:
uv run nox -s run-example -- examples/delete/delete_example.pyuv run mkdocs serve
uv run mkdocs build --strict