My App
Project

Contributing Guide

Contributing Guide

Contributing Guide

This document describes how to contribute to the Duragraph project. Please also review the Code of Conduct and Security Policy.


Local Development

  1. Clone the repo:

    git clone https://github.com/your-org/duragraph.git
    cd duragraph
  2. Install dependencies:

    • Go: go mod tidy
    • Python: poetry install (see workers/python-adapter)
    • Node/TypeScript (if applicable): npm install
  3. Run services locally:

    make up

Make Targets

Common make targets are provided:

  • make build – build Go binaries and containers
  • make test – run all tests (Go, Python, etc.)
  • make lint – run linting for all languages
  • make up – start local environment via Docker Compose
  • make down – stop local environment

Commit Style

We use Conventional Commits:

  • feat: for new features
  • fix: for bug fixes
  • docs: for documentation changes
  • chore: for maintenance
  • test: for adding tests

Example:

feat(api): add SSE streaming endpoint

Code Style

  • Go: enforced via gofmt, goimports, and golangci-lint in CI.
  • Python: linted with ruff, type-checked with mypy, formatted with black.
  • TypeScript: linted with eslint, formatted with prettier.

Consistency is enforced with pre-commit hooks.


Test Policy

  • All new features must include corresponding unit tests.
  • Conformance tests must pass before merging.
  • Integration tests validate API ↔ Temporal ↔ Workers.

Run full Go tests:

go test ./...

Python adapter tests:

cd workers/python-adapter
poetry run pytest

Conformance Tests

To run conformance tests across adapters:

make conformance

These verify that both Go and Python workers conform to the activity contract.


References