Python SDK for the CentralNic Reseller (fka RRPProxy) backend API, successor to the deprecated Hexonet Python SDK, published to PyPI. Node is present only for the release tooling, never for product code.
- Language / runtime: Python (3.14 in the devcontainer), built with setuptools from
pyproject.toml - Package name:
centralnicreseller.apiconnector, source incentralnicreseller/apiconnector/ - Default branch:
master
- The version string is written by the release in
pyproject.toml,centralnicreseller/apiconnector/__init__.py(__version__) andapiclient.py(getVersion()) — do not edit any of the three by hand. docs/is generated pdoc HTML from./scripts/documentation.sh— nothing in the release regenerates it (.releaserc.jsonruns only./scripts/createdistribution.sh), so run the script by hand and commit the result separately; never hand-edit it.htmlcov/is release-owned output — a@semantic-release/gitasset, tracked despite.gitignore../scripts/coverage.shrewrites it, so running the tests locally dirties tracked files.requirements.txtis generated and git-ignored —.devcontainer/post-create.shcompiles it frompyproject.tomlwithpip-compile; declare dependencies inpyproject.tomlonly.
- Formatting: Black (
blackinpyproject.toml,ms-python.black-formatterin the devcontainer). - CI's super-linter Black check filters on
/hexonet/*|/scripts/*|updateVersion.sh|setup.py, which does not matchcentralnicreseller/— runblackyourself rather than relying on CI.
- Framework: pytest with pytest-cov, config
[tool.pytest.ini_options]inpyproject.toml(testpaths = ["tests/"]), coverage config.coveragerc. - No real API calls in unit tests.
tests/test_apiclient.pyreplacesurlopenincentralnicreseller.apiconnector.apiclientviamonkeypatchand answers fromResponseTemplateManager.addTemplate(...)templates. tests/app.pyis the demo, not a test — it calls the live OT&E API withCNR_TEST_USER/CNR_TEST_PASSWORD.
./scripts/coverage.sh # pytest + HTML coverage into htmlcov/ — what CI runs
pnpm run test-demo # python ./tests/app.py — live OT&E API, needs credentials- CI delegates to
rtldev-middleware-shareable-workflows
(
python-sdk-test.ymlon pull requests,python-sdk-release.ymlon push tomaster). Do not reimplement them in this repository's workflow stubs. - CI Python matrix comes from the
RTLDEV_MW_CI_PYTHON_MATRIXorganisation variable, not from this repository. - Releases: semantic-release (
.releaserc.json) builds the sdist with./scripts/createdistribution.sh, uploads it with./scripts/uploaddistribution_live.sh, writes the changelog toHISTORY.mdand commits it back tomaster. - Lockfiles:
pnpm-lock.yamlis committed deliberately;package-lock.jsonis git-ignored — pnpm only. - Supply chain:
minimumReleaseAge: 1440inpnpm-workspace.yamlis enforced workspace-wide — wait out a red build rather than lowering it. - Devcontainer: the frame is in
.devcontainer/; the shared behaviour comes from thedevbasedevcontainer Feature (devbase:2) and Python from thepythonFeature. Never fork devbase's scripts here — repository-specific setup goes in.devcontainer/post-create.sh. - Runtime version policy: Node
enginesanddevEngines.packageManager(pnpm^11.0.0) inpackage.jsoncover the release tooling.
- Commit messages: Conventional Commits with mandatory scope —
<type>(<scope>): <summary>. Never append aCo-Authored-By:trailer. - Commit type selection:
fix/featare reserved for source changes — they trigger a release. Everything else uses a non-releasing type:ci(workflows, devcontainer),build(build tooling),chore,docs,test,refactor. - Breaking changes: add
BREAKING CHANGE: <summary>to the commit body after a blank line, and document the consumer upgrade path in the same change. - Branch creation: before creating a branch, and again after any PR merges,
run
git checkout master && git pull --ff-onlyfirst — it brings in the merged commits and their release tags. Never branch from a stale localmaster, fromorigin/master(it becomes the new branch's upstream) or from another feature branch. - Branch naming: prefix with the Jira issue ID —
RSRMID-1234-short-description. - Pull requests: include the Jira issue link in the description; after opening, add the PR URL as a comment on the Jira issue.
- Merging: rebase-merge (
gh pr merge --rebase). Squash merges are disabled at the repository level.
Work is tracked in Jira Cloud, project RSRMID — not GitHub Issues. Load the
jira-conventions skill before creating, editing or transitioning an issue: it carries the
required fields, this repository's title prefix and component, and the worklog rule for Done and Cancelled.
Two of its rules apply whether or not the skill is loaded:
- Write every Jira issue key as a link to the issue, never bare:
[RSRMID-1234](https://centralnic.atlassian.net/browse/RSRMID-1234). Branch names and commit messages keep the bare key. - Once an issue's last pull request has merged and its worklog is in, close it without asking if nothing is left — the skill lists what counts.
- Add dependencies without explicit request
- Add
Co-Authored-By:trailers to commit messages - Fork the
devbasedevcontainer Feature's scripts into this repository - Hand-edit
HISTORY.md,docs/or any of the three version strings — the release and./scripts/documentation.shown them - Commit a locally generated
htmlcov/— the release commits it - Commit
.envor display its contents — it is git-ignored for local environment variables such as credentials