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.
A note on analyzing code repositories: Attempting to quantify developer productivity by lines of code (or git commits) is generally a bad idea. rpo is designed to help you uncover how your code's contribution model has changed over time, and how you can build a more efficient and sustainable software operation. The tools here might tell you something about your development team - but it's even more likely that they'll tell you something about your management. Do you have high turnover and/or burnout problems? Are people committing way outside their normal work hours? How are you doing at documentation and knowledge transfer?
All that to say, while I hope this tool will be useful, it is not a substitute for thinking.
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
-I, --identify-by TEXT
-S, --sort-by TEXT
-a, --alias-file FILENAME 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.
-r, --repository PATH
-b, --branch TEXT
--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
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.0a0-py3-none-any.whl.
File metadata
- Download URL: rpo-0.1.0a0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e22d9b0f194b5862a2d6cc1e7d27b0c21e781f2eeef18f5ff15334f3c438744c
|
|
| MD5 |
8c2fb56a41e80dd2086e394bbb041e82
|
|
| BLAKE2b-256 |
67df1e4fd51f39ce850bd19810dec38556c9fd9b2d4bf22b50b79ede2633b74f
|