Publishing to PyPI
This repository publishes independently versioned packages:
| Package | pyproject.toml |
Tag | PyPI |
|---|---|---|---|
semblance |
repo root | v0.9.0 |
https://pypi.org/project/semblance/ |
semblance-foundry |
packages/semblance-foundry/ |
foundry-v0.1.3 |
https://pypi.org/project/semblance-foundry/ |
semblance-databricks |
packages/semblance-databricks/ |
databricks-v0.1.2 |
https://pypi.org/project/semblance-databricks/ |
Tagging is the release. Pushing a matching tag runs .github/workflows/release.yml: lint, typecheck, tests, security, then build and upload only the package that matches the tag. The workflow refuses to publish if the tag version does not equal the version in that package's pyproject.toml.
Do not tag v0.1.0 for Foundry or Databricks — that pattern is reserved for core Semblance and would fail the version check.
Prerequisites
- PyPI account – Register if needed.
semblance– API token stored as thePYPI_API_TOKENGitHub secret (project-scoped tosemblanceis enough).semblance-foundryandsemblance-databricks– Trusted Publishing (OIDC). Publish jobs useid-token: writeand must not setusername/password(a project-scopedPYPI_API_TOKENforsemblancewill 403 on adapter uploads).
Each adapter publisher must match this exactly:
| Field | Value |
|---|---|
| Owner | eddiethedean |
| Repository | semblance |
| Workflow filename | release.yml |
| Environment | empty (do not set a GitHub Environment on the job or on PyPI) |
For a project that does not exist yet, add a pending publisher with that project's name (semblance-databricks). The first successful databricks-v* tag creates the PyPI project.
Release checklist
- Working tree clean; CI green on
main. - Version in the target
pyproject.tomlmatches the intended tag. - Changelog section dated (not
Unreleased) with compare/tag links. - Foundry README / docs still say unofficial / not affiliated with Palantir.
- Databricks README / docs still say unofficial / not affiliated with Databricks.
- Commit the version bump, push
main, then tag:
# Core Semblance
git tag v0.9.0
git push origin v0.9.0
# Foundry adapter (separate tag, separate PyPI project)
git tag foundry-v0.1.3
git push origin foundry-v0.1.3
# Databricks adapter (separate tag, separate PyPI project)
git tag databricks-v0.1.2
git push origin databricks-v0.1.2
You cannot reuse a version number once it has been published.
Manual build (optional)
From the project root, for Test PyPI or a local check:
pip install build twine
python -m build # semblance
python -m build packages/semblance-foundry
python -m build packages/semblance-databricks
twine check dist/* packages/semblance-foundry/dist/* packages/semblance-databricks/dist/*
Upload only if you are not using the GitHub release workflow for that version:
TWINE_USERNAME=__token__ TWINE_PASSWORD=pypi-YOUR_TOKEN twine upload dist/*
Test PyPI: twine upload --repository testpypi dist/*
After publishing
- Semblance:
pip install semblance— https://pypi.org/project/semblance/ - Foundry:
pip install semblance-foundry— https://pypi.org/project/semblance-foundry/ - Databricks:
pip install semblance-databricks— https://pypi.org/project/semblance-databricks/ - GitHub Releases are created from the same tag (core wheels on
v*, Foundry wheels onfoundry-v*, Databricks wheels ondatabricks-v*).