Skip to main content

dev-health-ops

Open source analytics for developer health and team operating modes.

Dev Health Ops ingests engineering activity from Git providers, work trackers, deployments, incidents, and local repositories; normalizes it into persisted evidence; computes inspectable metrics; and serves those metrics to the GraphQL/API layer used by dev-health-web.

Why this exists

Developer health tooling often drifts into expensive, opaque scorecards that are easy to misuse. This project is intentionally different:

  • Accessibility over extraction: derive insight from data teams already own.
  • Learning, not judgment: show operating signals, not individual rankings.
  • Trends over absolutes: emphasize change over time and distributions.
  • Inspectable by default: metrics trace back to schemas, queries, and evidence.

Non-goals:

  • Individual leaderboards or performance scores
  • HR/performance-management workflows
  • Dashboards that hide definitions, provenance, or missing data

Current architecture

Dev Health Ops follows a strict pipeline boundary:

Providers → Processors → Sinks → Metrics → API / Visualization
  • Providers fetch raw provider data from GitHub, GitLab, Jira, Linear, local Git, CI/CD, deployments, incidents, and synthetic/demo sources.
  • Processors normalize provider records into internal models.
  • Sinks persist computed outputs. Analytics persistence is ClickHouse-only.
  • Metrics jobs compute daily rollups, DORA, complexity, risk, investment, AI workflow, and work graph outputs from persisted data.
  • API/GraphQL serves persisted analytics to dev-health-web and other consumers.

The primary visualization surface is now dev-health-web. Grafana is optional, and this repository no longer ships the old sample dashboard gallery in this README.

Install

Use the package directly:

pip install dev-health-ops
dev-hops --help

For local development from this repository:

pip install -r requirements.txt

The installed command is dev-hops.

Database model

Dev Health Ops uses two databases with different responsibilities:

Layer Backend Environment variable Purpose
Semantic PostgreSQL POSTGRES_URI Users, organizations, settings, credentials
Analytics ClickHouse CLICKHOUSE_URI Commits, PRs/MRs, work items, metrics, graph data

ClickHouse is required for analytics features. MongoDB, SQLite, and PostgreSQL analytics sinks have been removed or deprecated; SQLite remains only for narrow test/local fixture paths.

Start local services and run migrations:

docker compose up -d postgres clickhouse valkey

export POSTGRES_URI="postgresql+asyncpg://postgres:postgres@localhost:5555/postgres"
export CLICKHOUSE_URI="clickhouse://ch:ch@localhost:8123/default"

dev-hops migrate postgres
dev-hops migrate clickhouse

See docs/architecture/database-architecture.md and docs/ops/cli-reference.md for details.

Common workflows

Sync source data

# Local git repository
CLICKHOUSE_URI="clickhouse://ch:ch@localhost:8123/default" \
  dev-hops sync git --provider local --repo-path /path/to/repo

# GitHub repository
CLICKHOUSE_URI="clickhouse://ch:ch@localhost:8123/default" \
  dev-hops sync git --provider github \
  --auth "$GITHUB_TOKEN" \
  --owner <owner> \
  --repo <repo>

# Pull requests
CLICKHOUSE_URI="clickhouse://ch:ch@localhost:8123/default" \
  dev-hops sync prs --provider github \
  --auth "$GITHUB_TOKEN" \
  --owner <owner> \
  --repo <repo>

# Work items from Jira, GitHub, GitLab, Linear, synthetic data, or all providers
CLICKHOUSE_URI="clickhouse://ch:ch@localhost:8123/default" \
  dev-hops sync work-items --provider all --backfill 30

# Teams into the ClickHouse team catalog (ClickHouse is the system of record)
CLICKHOUSE_URI="clickhouse://ch:ch@localhost:8123/default" \
  dev-hops sync teams --provider config --path src/dev_health_ops/config/team_mapping.yaml --allow-empty

The bundled team_mapping.yaml is an empty onboarding sample. sync teams exits non-zero when no teams are persisted; pass --allow-empty only for intentional empty/no-op syncs such as validating the sample config.

Provider authentication can come from CLI flags or environment variables such as GITHUB_TOKEN, GITLAB_TOKEN, JIRA_*, ATLASSIAN_*, and LINEAR_API_KEY.

Compute metrics

# Daily analytics rollups
CLICKHOUSE_URI="clickhouse://ch:ch@localhost:8123/default" \
  dev-hops metrics daily --backfill 30

# Complexity and hotspot snapshots for a repository
CLICKHOUSE_URI="clickhouse://ch:ch@localhost:8123/default" \
  dev-hops metrics complexity --repo-path /path/to/repo --backfill 30

Generate demo data

dev-hops fixtures generate \
  --sink "clickhouse://ch:ch@localhost:8123/default" \
  --days 30 \
  --with-metrics \
  --with-work-graph

Run the API

POSTGRES_URI="postgresql+asyncpg://postgres:postgres@localhost:5555/postgres" \
CLICKHOUSE_URI="clickhouse://ch:ch@localhost:8123/default" \
  dev-hops api --reload

OpenAPI docs are available at http://localhost:8000/docs when the API is running. GraphQL is served by the API for the web app.

Run workers

Background jobs use Celery with Valkey/Redis:

POSTGRES_URI="postgresql+asyncpg://postgres:postgres@localhost:5555/postgres" \
CLICKHOUSE_URI="clickhouse://ch:ch@localhost:8123/default" \
CELERY_BROKER_URL="redis://localhost:6379/0" \
CELERY_RESULT_BACKEND="redis://localhost:6379/0" \
  dev-hops workers start-worker --queues default metrics sync reports

Test tiers

Canonical local test commands:

make test:unit
make test:integration
make test:e2e
make test:live-e2e
make test:ci

All tiers route through one entrypoint:

./ci/run_tests.sh <unit|integration|e2e|live-e2e|ci>

Notes:

  • integration is token-aware and skips provider tests cleanly when credentials are unavailable.
  • live-e2e starts a live backend harness, generates deterministic ClickHouse fixtures, waits for API readiness, and asserts /health, /api/v1/meta, and /api/v1/home.
  • ci blocks on flake8 and coverage-gated unit tests. black, isort, and mypy are advisory by default; set STRICT_QUALITY_GATES=1 to make them blocking.
  • JUnit XML paths are stable under test-results/junit/ and can be overridden with TEST_RESULTS_DIR / JUNIT_XML_* variables.

Container images

The repository builds two reusable images from docker/Dockerfile:

Image Purpose
dev-hops-api Runs dev-hops api on port 8000
dev-hops-runner Uses dev-hops as the entrypoint for sync, fixtures, metrics, and maintenance jobs

Build both images:

IMAGE_REGISTRY=ghcr.io/myorg/dev-health-ops \
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo latest) \
  ./scripts/build-images.sh

Run the API image:

docker run --rm -p 8000:8000 \
  -e POSTGRES_URI="postgresql+asyncpg://postgres:postgres@postgres:5432/postgres" \
  -e CLICKHOUSE_URI="clickhouse://ch:ch@clickhouse:8123/default" \
  dev-hops-api:latest

Run a CLI job through the runner image:

docker run --rm -it \
  --network dev-health_default \
  -v "$(pwd)":/app \
  -w /app \
  -e CLICKHOUSE_URI="clickhouse://ch:ch@clickhouse:8123/default" \
  dev-hops-runner:latest \
  metrics daily --backfill 14

Key docs

Guardrails

  • WorkUnits are evidence containers, not categories.
  • Investment categorization runs at compute time and persists distributions.
  • Theme rollups are deterministic from canonical subcategories.
  • UX-time LLM usage is explanation-only and must not recompute categories.
  • Analytics persistence goes through ClickHouse sinks, not file exports or debug dumps.

Metadata

Release files for dev-health-ops 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dev-health-ops 1.1.0
File Size Uploaded
dev_health_ops-1.1.0.tar.gz 3.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for dev-health-ops 1.1.0
File Interpreter ABI Platform
dev_health_ops-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.6 MB

Release files / dev_health_ops-1.1.0.tar.gz

Download URL dev_health_ops-1.1.0.tar.gz
Size 3.6 MB
Tags Source
SHA-256 checksum
How to use checksums
c1cfe8cc8d780b182fcb26e702bc9caf5e8552759000285a27f728dd85f0ade0
BLAKE2b-256 checksum
How to use checksums
1baad5c951b894468865dbb9098d0e0e14dc39b3fa564758363e41295c95f7c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / dev_health_ops-1.1.0-py3-none-any.whl

Download URL dev_health_ops-1.1.0-py3-none-any.whl
Size 2.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
3bccef3b9dfe3dee384a5d301cecf75a40f4a1d819f671fd7e80888675172581
BLAKE2b-256 checksum
How to use checksums
5ee3f6ce56e674bc0bee1e74ff93a76114b339f698790cefa1f42a00b26144a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page