We use Rye to manage dependencies because it will automatically provision a Python environment with the expected Python version. To set it up, run:
Or install Rye manually and run:
You can then run scripts using rye run python script.py or by activating the virtual environment:
Alternatively if you don't want to install Rye, you can stick with the standard pip setup by ensuring you have the Python version specified in .python-version, create a virtual environment however you desire and then install dependencies using this command:
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may result in merge conflicts between manual patches and changes from the generator. The generator will never modify the contents of the src/kernel/lib/ and examples/ directories.
All files in the examples/ directory are not modified by the generator and can be freely edited or added to.
If you’d like to use the repository from source, you can either install from git or link to a cloned repository:
To install via git:
Alternatively, you can build from source and install the wheel file:
Building this package will create two files in the dist/ directory, a .tar.gz containing the source files and a .whl that can be used to install the package efficiently.
To create a distributable version of the library, all you have to do is run this command:
Then to install:
This repository uses ruff and black to format the code in the repository.
To lint:
To format and fix all ruff issues automatically:
Changes made to this repository via the automated release PR pipeline should publish to PyPI automatically. If the changes aren't made through the automated pipeline, you may want to make releases manually.
You can release to package managers by using the Publish PyPI GitHub action. This requires a setup organization or repository secret to be set up.
If you need to manually release a package, you can run the bin/publish-pypi script with a PYPI_TOKEN set on the environment.