Skip to main content

Packaging and Distribution

This guide covers the utilities and automation available for packaging AlphaSwarm components for distribution.

Consistent Versioning​

AlphaSwarm consists of multiple repositories that should maintain consistent versioning to ensure compatibility.

Unified Version Bumper​

A utility script is provided to update the version across all pyproject.toml, package.json, and Python __version__ strings.

From the alphaswarm directory:

# Apply changes
make bump-version VERSION=0.2.0

Or run the script directly:

# Preview changes
./alphaswarm_platform/scripts/bump-version.py 0.2.0 --dry-run

The script updates:

  • version in pyproject.toml
  • Dependencies on other alphaswarm-* packages in pyproject.toml
  • version in package.json
  • __version__ in __init__.py and version.py files.

Source Packaging​

To package all Python modules as wheels and source distributions, and the frontend as a tarball.

From the alphaswarm directory:

make package-source

Or run the script directly:

./alphaswarm_platform/scripts/package-source.sh

Artefacts will be collected in the dist/ directory at the root of the workspace.

Python Wheels​

Each Python subproject (e.g., alphaswarm_core, alphaswarm_api) is built using the build PEP 517 builder. The resulting .whl and .tar.gz files are moved to the central dist/ folder.

Frontend Bundle​

The alphaswarm_client is built using pnpm build. The resulting dist/ folder is compressed into alphaswarm-client-dist.tar.gz.

Docker Images​

Multi-arch Docker images are the primary distribution format for production deployments.

Building all images​

From the alphaswarm directory:

make build IMAGE_TAG=0.2.0

This builds images for:

  • alphaswarm-client
  • alphaswarm-controller
  • alphaswarm-worker
  • alphaswarm-ingestion
  • alphaswarm-admin

Publishing to a Registry​

Use the publish-rpi command in alphaswarm-cli or manual docker push after building.

alphaswarm-cli deploy publish-rpi --registry docker.io/myorg --tag 0.2.0

Tagging Strategy​

When releasing a new version:

  1. Run bump-version.py <version>.
  2. Commit the changes.
  3. Tag each repository with v<version>.
  4. Push tags to trigger CI/CD pipelines.

Automated tagging across all repos can be performed via:

for d in alphaswarm*; do
git -C "$d" tag -a "v0.2.0" -m "Release v0.2.0"
done