Repository Participation Observer. A tool for investigation git repository contribution data and patterns.
Project description
RPO: Repository Participation Observer
A command line tool and Python library to help you analyze and visualized Git repositories. Ever wondered who has most contributions? How participation has changed over time? What are the hotspots in your code that change frequently? Who has the highest bus factor? rpo can help.
Usage
CLI
Usage: rpo [OPTIONS] COMMAND [ARGS]...
Options:
-g, --glob TEXT File path glob patterns to INCLUDE. If specified,
matching paths will be the only files included in
aggregation. If neither --glob nor
--xglob are specified, all files will be included
in aggregation. Paths are relative to root of
repository.
-xg, --xglob TEXT File path glob patterns to EXCLUDE. If specified,
matching paths will be filtered before
aggregation. If neither --glob nor
--xglob are specified, all files will be included
in aggregation. Paths are relative to root of
repository.
-A, --aggregate-by TEXT Controls the field used to aggregate data
-I, --identify-by TEXT Controls the field used to identify auhors.
-S, --sort-by TEXT Controls the field used to sort output
-a, --alias-file FILENAME Not currently used. A JSON file that maps a
contributor name to one or more aliases.
Useful in cases where authors have used multiple
email addresses, names, or spellings to create
commits.
-o, --output TEXT Path of the output file; format is determined by
the filename extension.
-r, --repository PATH
-b, --branch TEXT
--allow-dirty Proceed with analyis even if repository has
uncommitted changes
--help Show this message and exit.
Commands:
activity-report Simple commit report aggregated by author or committer
repo-blame Computes the per contributor blame for all files at a...
revisions List all revisions in the repository
summary Generate very high level summary for the repository
Library
pip install rpo
from rpo import Project, Repository
Examples
NOTE: depending on your shell, you may or may not need to escape the splat character in the glob patterns used below.
Git Blame for all Files in a Repo at a Given Revision, Identify Authors by Email
$ rpo -r ../my-local-repo -I email repo-blame -R HEAD
Author Activity Report, Including Only Files that Match a Pattern
$ rpo -r ../my-local-repo -g tests/\* activity-report
Author Activity Report, Excluding Files that Match a Pattern
$ rpo -r ../my-local-repo -xg tests/\* activity-report
File Activity Report, Excluding Files that Match a Pattern
$ rpo -r ../my-local-repo -xg tests/\* activity-report --files-report
Features
- Automatically generate aliases that refer to the same person
- Support analyzing by glob
- Support excluding by glob
- Produce blame charts
- Optionally ignore merge commits
- Optionally ignore whitespace
- Identify major refactorings
- Fast execution, even on giant repositories
Performance
The goal is for the library to work even on the largest libraries. In general, the performance is proportional to the number of authors, commits, and files being considered in the aggregations.
The authors regularly test using the cpython repository, which contains over 1,000,000 objects. That takes a while.
TODO: Performance graphs
Similar Projects and Inspiration
Thanks to GitPandas for inspiration.
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 Distributions
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 rpo-0.1.0a2-py3-none-any.whl.
File metadata
- Download URL: rpo-0.1.0a2-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
369ec22296a087194beeecacae17a98214bc409141c729dc46389d1f2283e222
|
|
| MD5 |
42b3fa291024ebe3945dc0eb49ea18c2
|
|
| BLAKE2b-256 |
9d5985cde5318a2b973fe48872a981948a61bdc632b3ceec1a2fc56973603bd4
|