We no longer use Poetry or pyenv for local development. The workflow relies on
uv for pinning Python versions, managing the virtual environment, syncing
dependencies, and installing standalone tools.
Use the helper script (preferred):
uv run python scripts/prepare.py 3.14 # or 3.10, 3.13, etc.This will:
uv python pin 3.14(updates.python-version)- Reuse or recreate
.venvtargeting that version - Install editable package + dev extras
Manual (alternative):
uv python pin 3.14
uv venv --python=3.14
uv pip install -e .[dev]We install pre-commit as a uv tool so it's always on PATH without activating
the venv:
uv tool install pre-commit
pre-commit install --overwriteRun checks manually:
pre-commit run --all-filesIf you prefer the venv-scoped binary:
uv run pre-commit install --overwriteuv run python scripts/prepare.py 3.10 # switches pin & reconciles venvUse scripts/bump.py (bump2version under uv) with patch default:
uv run python scripts/bump.py # patch bump
uv run python scripts/bump.py --minor # minor bump
uv run python scripts/bump.py --major # major bumpIt will show current -> next version (sourced from .bumpversion.cfg). After
that:
- Edit
CHANGES.rst. - Edit
docs/poly.pyif the new version tag needs to be added. - Modify nginx rule to route traffic to the latest version.
- Update
ROADMAP.mdas needed.
Build current version documentation to find and fix issues:
uv run make -C docs htmlBuild multiple versions documentation for deployment:
uv run sphinx-polyversion docs/poly.pynetstat -anp udp | grep 1611Run tests:
uv run pytestWith coverage:
uv run pytest --cov=pysnmp --cov-report=xml:coverage.xml