We want to make contributing to this project as easy and transparent as possible.
We use GitHub issues to track public bugs. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue.
Install uv if you don't have it already:
After cloning the repository, install the development dependencies:
uv sync --all-extrasRun the unit tests with:
uv run pytest testsOr with coverage:
uv run pytest --cov=pystemd testsThe E2E tests run in a systemd container using mkosi and are primarily designed
for CI. To run them locally, you need mkosi and systemd-container installed.
See .github/workflows/e2e-tests.yml for the full setup. For most contributions,
unit tests are sufficient.
Format your code before submitting a pull request:
uv run ruff check --fix pystemd examples tests e2e
uv run ruff format pystemd examples tests e2e
uv run isort .We use pyrefly for type checking. Run it with:
uv run pyrefly check pystemd examples testsOptionally, you can install pre-commit hooks to automatically format code on each commit:
uv run pre-commit installHave a fix or feature? Awesome! When you send the pull request we suggest you include a build output.
We will hold all contributions to the same quality and style standards as the existing code.
By contributing to this repository, you agree that your contributions will be licensed in accordance to the LICENSE document in the root of this repository.