Contributions are welcome. This guide summarises the process and project requirements.
-
Create a virtual environment for Python 3.10 or later.
-
Install dependencies with:
python -m pip install -e .[all,dev]
-
Run the quality checks before opening a pull request:
python -m pytest python -m ruff check . python -m black --check . python -m mypy --strict . python -m bandit -r src
- Formatting: Black (line length 88).
- Linting: Ruff (configuration in
pyproject.toml). - Typing:
mypy --strict. - Documentation: Google-style docstrings, factual tone.
- Imports: standard library, third-party, and local packages grouped and sorted.
To catch issues early, install the pre-commit hooks:
pip install pre-commit
pre-commit install
## Continuous Integration
All pull requests are automatically checked via GitHub Actions. CI will run:
- Linting (`ruff`)
- Formatting (`black`)
- Type checks (`mypy --strict`)
- Security checks (`bandit`)
- Tests (`pytest`)
Your PR must pass all checks before it can be merged.
## Commit expectations
- Keep commits focused and include tests when behaviour changes.
- Reference related issues when applicable.
- Follow the project's hash-chain ledger semantics when modifying ledger code
(each ledger entry stores the hash of the previous entry; see the README
section “Ledger output” for details).
## Communication
Use the GitHub issue tracker for bugs and feature requests. General questions
can be posted in Discussions or sent to s@scrrlt.dev.
Thank you for helping improve carbon-ops.