First off, thank you for considering contributing to the Python Prusa Connect Client SDK! It's people like you that make this tool great.
This project uses uv for dependency management and packaging, ensuring a
blazingly fast and reproducible development environment.
-
Install
uv: If you haven't already, install astral-sh/uv. -
Clone the Repository:
git clone https://github.com/dcode/python-prusa-connect-sdk-client.git cd python-prusa-connect-sdk-client
To set up your local development environment with all necessary dependencies
(including development tools, testing frameworks, documentation builders, and
the optional cli feature):
uv sync --all-extras --all-groupsThis command will automatically create a virtual environment at .venv/ and
synchronize it lock-step with uv.lock.
To activate the virtual environment so your terminal recognizes the installed tools:
source .venv/bin/activateThis project strictly adheres to continuous integration checks to maintain high
code quality. We use pre-commit to catch linting, formatting, and
type-checking issues before they are committed.
-
Install the pre-commit hooks:
pre-commit install
Now, every time you run
git commit, the hooks will automatically format and check your code. -
Run hooks manually (optional, but recommended before pushing):
pre-commit run --all-files
- Formatting/Linting:
ruff(configured inpyproject.toml) - Type Checking:
pyrefly(apyrightreplacement) - Markdown:
mdformatandmarkdownlint
We use pytest for our unit testing framework. To run the full test suite
locally:
uv run pytestIf you add a new feature or fix a bug, please ensure you write a corresponding
test in the tests/ directory to verify the behavior.
The documentation is built using MkDocs and the Material for MkDocs theme. To preview your changes to the documentation locally:
uv run mkdocs serveThis will start a local web server (usually at http://127.0.0.1:8000) that
automatically reloads whenever you save a Markdown file.
- Fork the repository and create a new branch containing your feature or bugfix.
- Commit your changes using descriptive commit messages.
- Ensure tests and linters pass locally.
- Open a Pull Request against the
mainbranch. - Wait for the CI GitHub Actions to complete successfully.
Thank you for contributing!