git-hours
Estimate time spent on a git repository.
Port to Python of the git-hours project by https://github.com/kimmobrunfeldt/git-hours.
THIS PORT IS NOT COMPLETE YET. IF YOU WANT TO HELP, PLEASE DO SO.
Example use
Time spent on developing SQLAlchemy:
➜ bootstrap git:(master) git-hours
{
...
'total': {
'hours': 18276.158333333322,
'commits': 15504,
},
}
From a person working 8 hours per day, it would take more than 10 years to build SQLAlchemy.
Please note that the information is not be accurate enough to be used in billing.
Install
$ pipx install git-hours
How it works
The algorithm for estimating hours is quite simple. For each author in the commit history, do the following:
Go through all commits and compare the difference between them in time.
If the difference is smaller or equal then a given threshold, group the commits to a same coding session.
If the difference is bigger than a given threshold, the coding session is finished.
To compensate the first commit whose work is unknown, we add extra hours to the coding session.
Continue until we have determined all coding sessions and sum the hours made by individual authors.
Usage
In root of a git repository run:
$ git-hours
Metadata
Release files for git-hours 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| git-hours-0.1.3.tar.gz | 5.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| git_hours-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / git-hours-0.1.3.tar.gz
| Download URL | git-hours-0.1.3.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e751c6cbcabfba156c7c3f7328fc8308a1eedd5a1ed0f05757d97c1b7edceb1
|
|
BLAKE2b-256 checksum How to use checksums |
65a9e63e9d5ea97444c5cff5bbe9daa02938f78413289efc930e1288dab8d05a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / git_hours-0.1.3-py3-none-any.whl
| Download URL | git_hours-0.1.3-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
19617fdd7b737a6d6a87576331ddb8478b49fbd730dede66b558e9fbad6e2ec2
|
|
BLAKE2b-256 checksum How to use checksums |
dcd7dc5dbb970d18a3b80d14bace852d8ea8b0e404ecedb2b992e0fdd6493475
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|