Contributing to TrustBench¶
Thank you for your interest in contributing to TrustBench! We welcome contributions from researchers, engineers, and community members.
Code of Conduct¶
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
Development Setup¶
-
Clone the repository:
-
Install with development dependencies: TrustBench uses uv or standard pip/virtualenv:
-
Verify the test suite:
-
Verify linting:
-
Build documentation locally:
Pull Request Guidelines¶
- Create a topic branch:
- Keep the core small and framework-agnostic:
- Never import optional frameworks (
torch,tensorflow,jax,onnxruntime,plotly) at top-level core modules (trustbench.core). - Use dynamic imports and verify with import isolation tests.
- Add unit tests:
- Place tests under
tests/unit/ortests/integration/. - Ensure
pytestpasses with 100% clean exit. - Adhere to Code Style:
- Format and lint using
ruff check --fix .. - Update Documentation:
- If adding a new metric, adapter, or configuration parameter, update relevant documents in
docs/andREADME.md. - Submit PR:
- Provide a clear summary of changes, rationale, and test results using the pull request template.
Reporting Bugs¶
Please use the Bug Report Template and include:
- Operating system and Python version
- TrustBench version (trustbench version)
- Minimal reproducible example
- Full stack trace