Use Python 3.11 or newer and install
uv. From the
repository root, create the environment and install all development
dependencies:
uv sync --all-extrasBefore opening a pull request, run:
make test
uv run hatch build
uv run python -m twine check dist/*To develop against a local SDK checkout, set SOCKET_SDK_PATH if it is not at
../socketdev, then run make first-time-local-setup.
The Package Check workflow runs automatically for pull requests. It builds
and validates the distributions, smoke-tests the wheel, and uploads the
distributions as workflow artifacts. It does not publish a package or Docker
image.
Preview publication is intentionally opt-in. Only request previews for code that is trusted to run with the repository's publishing permissions.
For a pull request from this repository, apply the label for the artifact that needs testing:
publish-previewpublishes a uniquely versionedsocketsecurityprerelease to TestPyPI and adds or updates a pull request comment with the exact version and installation command.publish-docker-previewpublishes the mutablesocketdev/cli:pr-<pull-request-number>image to Docker Hub and adds or updates a pull request comment with the image tag.
Both label-triggered and manually dispatched previews are limited to open pull requests whose branches belong to this repository. Each label is handled as a separate event, so applying both labels starts two workflow runs. Use manual dispatch instead when both artifacts should be published in a single run.
The workflow reacts when a label is added; pushing another commit while the label remains on the pull request does not publish a new preview. To publish the new pull request head or retry a failed publication, remove the relevant label and apply it again.
Maintainers can also open Actions > Publish PR Preview > Run workflow, run
it from the repository's default branch, enter the pull request number, and
choose whether to publish to TestPyPI, Docker Hub, or both. When testing the CLI
against an SDK preview, enter the exact TestPyPI socketdev prerelease in
sdk_preview_version; publish the SDK preview first and allow time for
TestPyPI to expose it before starting the CLI Docker preview.