The SDK is the primary form that clients interact with SDS: either directly by installing the Python package from PyPI, or indirectly by using the SDS Web UI or the Visualization Component.
This is the development README. See users' readme for a guide on how to install and use the SDK.
uv- Python environment managerjust- saves time by automating common tasks- GNU
coreutils, GNUtar. - Optional:
gh- GitHub CLI for running GitHub Actions.gh-act-ghextension for running GitHub Actions locally (incl. pyright action).
Everything else is installed by uv in the virtual environment whenever a uv sync or
uv run command is executed.
GitHub Actions automate code quality checks, testing, and package publishing. See the justfile and the GitHub Actions workflows for specific details.
just --listAvailable recipes:
default # show available recipes
[development]
dev-setup # installs the development environment with pre-commit hooks and synced deps [alias: install]
gact *args # runs GitHub Actions locally
pre-commit # runs pre-commit checks locally, incl. deptry for dependency issues [alias: hooks]
pyrefly *args # runs the Pyrefly type checker
pyright *args # runs Pyright checks locally
update # updates development dependencies and pre-commit hooks
[documentation]
docs-build # build SDK documentation
docs-serve port="1314" *args="" # serve SDK documentation locally
docs-serve-compose *args # builds and serves SDK documentation via nginx in docker compose
[packaging]
build *args # builds the package and runs smoke tests on the built artifact
check-acceptance # checks the built package acceptance tests
clean # removes temporary and build files
publish # publishes the built package to PyPI (prefer the trusted publishers method in GitHub)
[qa]
check-acceptance # checks the built package acceptance tests
gact *args # runs GitHub Actions locally
pre-commit # runs pre-commit checks locally, incl. deptry for dependency issues [alias: hooks]
pyrefly *args # runs the Pyrefly type checker
pyright *args # runs Pyright checks locally
serve-coverage # serves the HTML coverage report at http://localhost:1313 [alias: serve]
test python=python_version *pytest_args # runs tests using the default dependency resolution
test-all *args # tests against all supported python versions and dep lower bounds (no integration tests)
test-integration python=python_version *pytest_args # runs integration tests using the default dependency resolution
test-integration-verbose python=python_version *pytest_args # runs integration tests in verbose mode with stdout capture; useful for debugging test failures
test-lowest python=python_version *pytest_args # runs tests against the lowest dependency versions
test-verbose python=python_version *pytest_args # runs local tests in verbose mode with stdout capture; useful for debugging test failuresExamples:
just dev-setup
just test
just test 3.12 --no-cov -k test_authentication
just pre-commit
just buildTip
If testing a python version other than the default, you can run just dev-setup again to reset the environment to the default version after running the tests
Integration tests need more setup. You need to deploy the Gateway and Network components, create a test user, and set up the integration test environment:
- Follow the Network setup instructions in the Network README;
- Adjust TLS according to your setup;
- Modify your local DNS resolution if you'd like to simulate requests to a custom domain;
- Follow the Gateway instructions in the Gateway README; In
summary:
- Deploy the Docker Compose stack;
- Create a MinIO user and bucket with same credentials as in
minio.env;
- Create a test user and API key:
- Create a Gateway superuser and a regular user (they may be the same);
- Enable their
is_approvedflag in the admin panel; - With the flag enabled, login as that user and create an API key for them;
- Copy / save the key.
- Integration test setup:
- Create
tests/integration/integration.envfrom its example counterpart - Set the api key to the one created.
- Run the
just test-integrationtarget.
- Create
Then you can run the integration tests:
just test-integration
# runs integration tests with pytest
just test-integration-verbose
# like just test-integration, but with extra verbosity and log capture# simple tests execution (similar to `just test`)
uv run pytest -v
# running similar tests (substring match)
uv run pytest -v -k test_authentication
# running a specific test
uv run pytest -v tests/test_usage.py::test_authentication_200_succeeds
# verbose with colored log messages (similar to `just test-verbose`)
uv run pytest -vvv --show-capture=stdout -o log_cli=true --log-cli-level=DEBUG --capture=no