Development#

This page covers local development setup, uv usage, and building Docker images.

uv setup#

# Install uv (see https://docs.astral.sh/uv/getting-started/installation/)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone and install with extras for docs/dev
git clone https://github.com/Laboratoire-de-Chemoinformatique/SynPlanner.git
cd SynPlanner
uv sync --group docs --group dev --extra cpu

# Run tests
uv run pytest -q

Build CLI Docker image#

docker build --platform linux/amd64 -t synplan:dev-cli-amd64 -f cli.Dockerfile .
docker run --rm --platform linux/amd64 synplan:dev-cli-amd64 --help

Build GUI Docker image#

docker build --platform linux/amd64 -t synplan:dev-gui-amd64 -f gui.Dockerfile .
docker run --rm --platform linux/amd64 -p 8501:8501 synplan:dev-gui-amd64

Bump version#

Version is managed by bump-my-version. Config lives in pyproject.toml under [tool.bumpversion].

# patch: 1.4.2 → 1.4.3
uvx bump-my-version bump patch --allow-dirty

# minor: 1.4.3 → 1.5.0
uvx bump-my-version bump minor --allow-dirty

# major: 1.5.0 → 2.0.0
uvx bump-my-version bump major --allow-dirty

This updates pyproject.toml (version + current_version) and README.md (Docker VERSION) automatically.

Manual steps after bumping:

  1. Update docs/_static/switcher.json — add the old version to the list and rename (stable) to the new version.

  2. Update CHANGELOG.md — move items from [Unreleased] into a new section and add footer links.

Publish to GHCR (maintainers)#

Images are published automatically by CI on pushes to main and manual dispatches. To push locally (requires write permissions to the repo’s packages):

VERSION=$(python -c 'import tomllib,sys;print(tomllib.load(open("pyproject.toml","rb"))["project"]["version"])')
docker login ghcr.io -u USERNAME -p TOKEN
REPO=ghcr.io/laboratoire-de-chemoinformatique/synplanner
docker tag synplan:dev-cli-amd64 ${REPO}:${VERSION}-cli-amd64
docker tag synplan:dev-gui-amd64 ${REPO}:${VERSION}-gui-amd64
docker push ${REPO}:${VERSION}-cli-amd64
docker push ${REPO}:${VERSION}-gui-amd64