pyproject and uv - Release and Deploy
Development
uv pip install --group dev
Release
Update uv:
uv self update
Make sure all the branches are aligned:
kb.py --checkout
Bump the version - making sure the version number increments by only 1:
uv version --bump patch
# commit
git add pyproject.toml uv.lock
git commit -m "chore: 'pyproject.toml' - bump version"
Tag and publish the project:
kb.py --release
git push
Deploy
Docker
cd ~/dev/module/docker-containers/django
kb-deploy.py --pypi http://salt.kb.vpn/kb/dev/+simple/ --registry kb-software --package kb-hatherleigh --version 0.0.00
Push to the Digital Ocean repository:
docker push registry.digitalocean.com/kbsoftware/package/kb-hatherleigh
For notes on the Digital Ocean Container Registy, doctl
Linux Server
Install uv and kb-deploy.py:
sudo -i -u web
mkdir -p ~/dev/module/
git clone git@github.com:pkimber/toolbox.git
git checkout 7043-pyproject-toml
ln -s ~/dev/module/toolbox/kb-deploy.py ~/opt/
Configuration (add pyproject to your pillar):
www.hatherleigh.info:
testing: True
profile: django
pyproject: True
Deploy:
sudo -i -u web
cd ~/repo/project/www.hatherleigh.info/deploy
# For our private (VPN) 'devpi'
kb-deploy.py --pypi http://salt.kb.vpn/kb/dev/+simple/ --package kb-hatherleigh-info --version 0.0.00
cd ../live/
www.hatherleigh.info.sh collectstatic
Windows Server
# copy 'kb-deploy.py' to the local folder
uv run .\kb-deploy.py --package kb-hatherleigh-info --version 0.0.00 --pypi https://pypi.kbsoftware.co.uk/kb/dev/+simple/
cd .\2025-09-19-155501\
.\.venv\Scripts\activate.ps1
django-admin collectstatic
Warning
You may need to deactivate any activated virtual environments before running
the uv run command.