Contributing Guide
This document describes how to contribute to the DuraGraph project.
Local Development
Section titled “Local Development”-
Clone the repo:
Terminal window git clone https://github.com/Duragraph/duragraph.gitcd duragraph -
Install dependencies:
- Go:
go mod tidy - Task: Install Task runner
- Go:
-
Run services locally:
Terminal window task up
Task Commands
Section titled “Task Commands”Common task commands are provided:
task build:server– build Go server binarytask test– run all teststask lint:go– run lintingtask up– start local environment via Docker Composetask down– stop local environmenttask health– check health of all services
Commit Style
Section titled “Commit Style”We use Conventional Commits:
feat:for new featuresfix:for bug fixesdocs:for documentation changeschore:for maintenancetest:for adding tests
Example:
feat(api): add SSE streaming endpointCode Style
Section titled “Code Style”- Go: enforced via
gofmt,goimports, andgolangci-lintin CI. - Python: linted with
ruff, type-checked withmypy, formatted withblack. - TypeScript: linted with
eslint, formatted withprettier.
Consistency is enforced with pre-commit hooks.
Test Policy
Section titled “Test Policy”- All new features must include corresponding unit tests.
- Conformance tests must pass before merging.
- Integration tests validate API ↔ Database ↔ Event streaming.
Run full Go tests:
task testRun unit tests only:
task test:unitConformance Tests
Section titled “Conformance Tests”To run conformance tests across adapters:
make conformanceThese verify that both Go and Python workers conform to the activity contract.