Release Checklist
This page outlines the steps to prepare and publish a new pynetbox release. The package version is derived from the git tag at release time by setuptools_scm, so the source tree does not carry a hardcoded version in pyproject.toml.
Pre-Release Tasks
-
Ensure all tests pass (the integration run needs Docker):
pre-commit run --all-files pytest tests --ignore=tests/integration pytest tests/integration --netbox-versions 4.4,4.5,4.6 -
Update
__version__inpynetbox/__init__.pyto the new version. -
Update
CHANGELOG.mdanddocs/release-notes.mdwith a summary of changes, referencing the relevant issue and PR numbers. -
Check supported NetBox versions:
- Review the latest netbox-docker releases.
- Update
DEFAULT_NETBOX_VERSIONSintests/conftest.pyand theget_netbox_docker_version_tagfunction intests/integration/conftest.pyif there are new NetBox versions or new netbox-docker tag mappings. - Update the
includelegs of theintegrationjob in.github/workflows/ci.ymlso each supported NetBox version is covered by one leg.
Release Tasks
-
Create a release branch from
main:git checkout main git pull git checkout -b release/vX.Y.Z -
Commit the version bump and changelog updates:
git commit -m "Prepare release vX.Y.Z" -
Open a pull request to merge the release branch into
main. -
Once the PR is merged, publish a GitHub release:
- Go to the Releases page on GitHub.
- Click Draft a new release.
- Create a new tag named
vX.Y.Zagainstmain. - Paste the relevant changelog section into the release notes.
- Publish the release.
Publishing triggers the publish.yml workflow, which builds the sdist and wheel and uploads them to PyPI.
Supported NetBox Versions
pynetbox aims to support the current and previous two minor versions of NetBox. The supported versions are defined by DEFAULT_NETBOX_VERSIONS in tests/conftest.py and the get_netbox_docker_version_tag function in tests/integration/conftest.py, and should be reviewed and updated each release cycle.