Thanks for your interest in improving the Onepin Python SDK + CLI.
This repository contains two distinct surfaces (see AGENTS.md for detail):
src/onepin/— generated SDK. Do not edit by hand; changes are overwritten when the SDK is regenerated from the OpenAPI spec.src/onepin/_cli/— the hand-rolled Typer CLI. This is where most contributions land.
If your change is to the generated SDK surface, it almost certainly belongs in the OpenAPI spec, not in this repo.
This project uses uv.
uv sync --all-extras # or: make installCommon tasks:
make lint # ruff check + format check (scoped to src/onepin/_cli + tests)
make test # pytest
make build # build wheel + sdistWhen linting manually, always scope to the hand-rolled code — never run ruff check . (it skips _cli/ due to the generated-tree exclude). Use:
uv run ruff check src/onepin/_cli tests
uv run ruff format src/onepin/_cli tests- Put tests under
tests/(unit/,cli/,build/). Tests undersrc/onepin/tests/are not collected. respxmockshttpx;pytest-asyncioruns in auto mode.- New behavior needs a test. Bug fixes need a regression test.
- PRs must keep diff coverage ≥ 90% and overall
onepin._clicoverage ≥ 80%.
Commits must follow Conventional Commits. This is enforced in CI (commitlint) and drives automated versioning and the changelog.
<type>: <summary>
[optional body]
Common types: feat, fix, docs, chore, refactor, test, ci, build.
feat:→ minor releasefix:→ patch releasefeat!:or aBREAKING CHANGE:footer → breaking release
Do not hand-edit CHANGELOG.md or the version — release automation owns both.
- Branch from
main. - Keep the change focused; one logical change per PR.
- Ensure
make lintandmake testpass locally. - Open the PR against
main. CI runs the full matrix (Python 3.10–3.13 on Linux, macOS, Windows) plus a fresh-venv install smoke test. - A maintainer review is required before merge. PRs squash-merge, so the PR title becomes the commit subject — make it a valid Conventional Commit.
Use the issue templates. For security issues, do not open a public issue — see SECURITY.md.
By contributing, you agree that your contributions are licensed under the MIT License.