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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file git-hours-0.1.3.tar.gz.

File metadata

  • Download URL: git-hours-0.1.3.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for git-hours-0.1.3.tar.gz
Algorithm Hash digest
SHA256 9e751c6cbcabfba156c7c3f7328fc8308a1eedd5a1ed0f05757d97c1b7edceb1
MD5 99ae2e27e6cb839b9baa5ed04b6e530f
BLAKE2b-256 65a9e63e9d5ea97444c5cff5bbe9daa02938f78413289efc930e1288dab8d05a

See more details on using hashes here.

File details

Details for the file git_hours-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: git_hours-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for git_hours-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 19617fdd7b737a6d6a87576331ddb8478b49fbd730dede66b558e9fbad6e2ec2
MD5 13327c6c2c250cb6719b5d417f3f41ed
BLAKE2b-256 dcd7dc5dbb970d18a3b80d14bace852d8ea8b0e404ecedb2b992e0fdd6493475

See more details on using hashes here.

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