Contributing¶
Development setup¶
git clone https://github.com/ylabonte/myviolet.git
cd myviolet
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e . --group dev --group test
pre-commit install
The repository ships with a devcontainer (.devcontainer/devcontainer.json)
that takes care of all of the above and auto-starts the local mock service on
port 8080. Open the repo in VS Code or GitHub Codespaces to use it.
Running tests¶
pytest # unit tests with coverage
pytest -x # stop on first failure
pytest tests/test_readings.py -v # run a single file
pytest -m integration # integration tests (need the mock running)
Code quality¶
Pre-commit hooks run these automatically on git commit.
Mock service¶
The mock service replays a captured demo.myviolet.de snapshot and applies
writes to its in-memory state, so integration tests can verify true
round-trips against a faithful (if simplified) controller.
The devcontainer starts this automatically.
Submitting changes¶
- Fork the repository and create a feature branch from
main. - Make your changes with tests.
- Ensure
pytest,ruff check ., andmypy srcall pass locally. - Open a pull request against
main. Use the PR template.
Ideas and questions¶
Use GitHub Issues for feature requests, bug reports, and questions so the community can benefit.
Contact¶
Yannic Labonte yannic.labonte@gmail.com