A tool to calculate the DORA Lead Time metric
Project description
DORA Lead Time Metric
A tool to generate lead time charts and outlier reports by connecting data from Jira and GitHub.
Overview
Lead Time for Changes is one of the four key DORA (DevOps Research and Assessment) metrics that measure software delivery performance. It measures the time it takes from when code is committed to when it is successfully running in production. A shorter lead time indicates an organization's ability to respond quickly to customer needs and fix problems rapidly.
This Python package calculates lead time by connecting data from Jira and GitHub. The calculation involves going from Projects → Releases → Stories → Pull Requests → Commits, calculating the lead time for each pull request, and averaging those over a given time period.
Requirements
- Python 3.13 or higher
- OpenAI API key and other parameters (set in your .env file)
Installation
This project uses Poetry for dependency management.
-
Install Poetry by following the instructions in the official documentation.
Quick installation methods:
# For Linux, macOS, Windows (WSL) curl -sSL https://install.python-poetry.org | python3 -
# For Windows PowerShell (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
-
Install Project Dependencies
# Clone the repository git clone https://github.com/sualeh/dora-lead-time-metric.git cd dora-lead-time-metric
-
Install dependencies using Poetry
poetry install --extras "dev" poetry show --tree
Configuration
Create an ".env" file in the project root based on ".env.example", and similarly create an ".env.params" file based on ".env.params.example".
Usage
- Create releases database
poetry run python -m dora_lead_time.main --build
- Generate lead time charts
poetry run python -m dora_lead_time.main --charts
- Generate outlier reports
poetry run python -m dora_lead_time.main --reports
Development and Testing
-
Install dependencies, as above.
-
Run all tests:
poetry run pytest
Docker Compose Usage
You can also use Docker Compose for easier management of the Local RAG container:
-
Clone the project, as described above.
-
Configure the ".env" and ".env.params" files as described above.
-
Run the application using Docker Compose:
# To build a releases database docker-compose run dora-lead-time --build
# To generate lead time charts docker-compose run dora-lead-time --charts
# To generate outlier reports docker-compose run dora-lead-time --reports
This approach simplifies volume mounting and environment variable management, especially when working with the tool regularly.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dora_lead_time_metric-1.2.2.tar.gz.
File metadata
- Download URL: dora_lead_time_metric-1.2.2.tar.gz
- Upload date:
- Size: 23.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7f53d6f10cdf7fc629ac06ce59510329bb8f36eed00d3461c02d25dc50f74c1
|
|
| MD5 |
20d32232d03017d1d23a308fac3462a8
|
|
| BLAKE2b-256 |
ac3bb2db2af86cc1f5ba33facfaad7eab1f0fd11589e99bbd46052d74466e862
|
Provenance
The following attestation bundles were made for dora_lead_time_metric-1.2.2.tar.gz:
Publisher:
publish-pypi.yml on sualeh/dora-lead-time-metric
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dora_lead_time_metric-1.2.2.tar.gz -
Subject digest:
d7f53d6f10cdf7fc629ac06ce59510329bb8f36eed00d3461c02d25dc50f74c1 - Sigstore transparency entry: 598099874
- Sigstore integration time:
-
Permalink:
sualeh/dora-lead-time-metric@0d43260f05906ecd0ed238f9619affe39a54017f -
Branch / Tag:
refs/tags/v1.2.2 - Owner: https://github.com/sualeh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@0d43260f05906ecd0ed238f9619affe39a54017f -
Trigger Event:
push
-
Statement type:
File details
Details for the file dora_lead_time_metric-1.2.2-py3-none-any.whl.
File metadata
- Download URL: dora_lead_time_metric-1.2.2-py3-none-any.whl
- Upload date:
- Size: 31.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4eb5698cd4b081d82167ac123d94ac60535a32c3d908d1a463a0a08ad787b9c
|
|
| MD5 |
086ae1e81be943ec4135a5490bf6f294
|
|
| BLAKE2b-256 |
37f563fff124da07d9047757b03f5256d9be48b3367b2af812be7eadeec625a1
|
Provenance
The following attestation bundles were made for dora_lead_time_metric-1.2.2-py3-none-any.whl:
Publisher:
publish-pypi.yml on sualeh/dora-lead-time-metric
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dora_lead_time_metric-1.2.2-py3-none-any.whl -
Subject digest:
a4eb5698cd4b081d82167ac123d94ac60535a32c3d908d1a463a0a08ad787b9c - Sigstore transparency entry: 598099880
- Sigstore integration time:
-
Permalink:
sualeh/dora-lead-time-metric@0d43260f05906ecd0ed238f9619affe39a54017f -
Branch / Tag:
refs/tags/v1.2.2 - Owner: https://github.com/sualeh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@0d43260f05906ecd0ed238f9619affe39a54017f -
Trigger Event:
push
-
Statement type: