Skip to main content

Estimate time spent on a git repository

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git-hours-0.1.3.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

git_hours-0.1.3-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page