Skip to content

ephess/dora-metrics-calculator

Repository files navigation

DORA Metrics Back-Calculation Tool

A tool for calculating DORA (DevOps Research and Assessment) metrics from GitHub repositories.

Features

  • Extract commit history from git repositories
  • Fetch PR and release data from GitHub using GraphQL API
  • Associate commits with pull requests and deployments
  • Export data for manual annotation
  • Calculate the four key DORA metrics:
    • Lead Time for Changes
    • Deployment Frequency
    • Change Failure Rate
    • Mean Time to Restore (MTTR)

Installation

pip install -e ".[dev]"

Usage

# Extract data from a repository
dora-metrics extract --repo ./path/to/repo --since 2024-01-01

# Import annotated data
dora-metrics import annotations.csv

# Calculate metrics
dora-metrics calculate --period monthly

# Update with new data
dora-metrics update

Development

Run tests:

pytest

Run with coverage:

pytest --cov=dora_metrics

Format code:

black src tests
ruff check src tests

Architecture

See ARCHITECTURE.md for detailed design documentation.

Implementation Plan

See IMPLEMENTATION_PLAN.md for the development roadmap.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published