Skip to main content

nwcommitaverages

Introduction

This packages consists of the following modules:

  • nwcommitaverages is an application designed to calculate the average time between Git commits.
  • nwcommitaveragescli is a command-line application built on the top of nwcommitaverages.

Pre-Requisites

In order to work, this library requires to be run against a local Git repository and that Git itself is installed on the machine.

Getting Started

I'll use Debian as operating system, but the concept is similar for Windows or Mac.

Procedure:

  1. Install pip and venv:
sudo apt install python3-pip python3.12-venv
  1. Create a virtual environment:
python3 -m venv /tmp/nwcommitaverages
source /tmp/nwcommitaverages/bin/activate
  1. Download and install the package:
pip install nwcommitaverages
  1. Enter in the interactive Python environment:
python3
Python 3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
  1. Try out if the library works:
from nwcommitaverages import CommitAverageCalculator

ca_calculator : CommitAverageCalculator = CommitAverageCalculator()
  1. Exit from the interactive Python environment:
exit()
  1. Try out if the CLI application works:
nwcommitaveragescli
  1. Deactivate and delete the virtual environment:
deactivate
rm -rf /tmp/nwcommitaverages
  1. Done!

Examples

To run it against the current folder (we assume it contains a git repository and that git itself is installed):

nwcommitaveragescli
*****************************************************************
'##::: ##:'##:::::'##::'######:::::'###::::'##::::'##::'######:::
 ###:: ##: ##:'##: ##:'##... ##:::'## ##::: ##:::: ##:'##... ##::
 ####: ##: ##: ##: ##: ##:::..:::'##:. ##:: ##:::: ##: ##:::..:::
 ## ## ##: ##: ##: ##: ##:::::::'##:::. ##: ##:::: ##: ##::'####:
 ##. ####: ##: ##: ##: ##::::::: #########:. ##:: ##:: ##::: ##::
 ##:. ###: ##: ##: ##: ##::: ##: ##.... ##::. ## ##::: ##::: ##::
 ##::. ##:. ###. ###::. ######:: ##:::: ##:::. ###::::. ######:::
..::::..:::...::...::::......:::..:::::..:::::...::::::......::::
**********************************************Version: 2.0.1*****

Folder:'/home'

+-------------+--------+-----------+---------------+------------+
| YearMonth   | Days   | Commits   | DailyAvgMin   | RefNames   |
+=============+========+===========+===============+============+
| 2025-05     | 2      | 29        | 16.71         |            |
+-------------+--------+-----------+---------------+------------+
| 2026-03     | 2      | 26        | 16.43         |            |
+-------------+--------+-----------+---------------+------------+
| 2026-04     | 1      | 4         | 73.76         |            |
+-------------+--------+-----------+---------------+------------+

To run it against another folder (which doesn't contain a git repository):

nwcommitaveragescli --folder_path /home/test
*****************************************************************
'##::: ##:'##:::::'##::'######:::::'###::::'##::::'##::'######:::
 ###:: ##: ##:'##: ##:'##... ##:::'## ##::: ##:::: ##:'##... ##::
 ####: ##: ##: ##: ##: ##:::..:::'##:. ##:: ##:::: ##: ##:::..:::
 ## ## ##: ##: ##: ##: ##:::::::'##:::. ##: ##:::: ##: ##::'####:
 ##. ####: ##: ##: ##: ##::::::: #########:. ##:: ##:: ##::: ##::
 ##:. ###: ##: ##: ##: ##::: ##: ##.... ##::. ## ##::: ##::: ##::
 ##::. ##:. ###. ###::. ######:: ##:::: ##:::. ###::::. ######:::
..::::..:::...::...::::......:::..:::::..:::::...::::::......::::
**********************************************Version: 2.0.1*****

Folder:'/home/test'

Command '['git', '-C', '/home/test', 'log', '--pretty=format:%cs;%ct;%D', '--reverse']' returned non-zero exit status 128.

Total Downloads (PyPi)

PyPI Downloads

Metadata

Release files for nwcommitaverages 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nwcommitaverages 2.0.1
File Size Uploaded
nwcommitaverages-2.0.1.tar.gz 10.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nwcommitaverages 2.0.1
File Interpreter ABI Platform
nwcommitaverages-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 19.8 kB

Release files / nwcommitaverages-2.0.1.tar.gz

Download URL nwcommitaverages-2.0.1.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
42b4beea09f2cb750daf1dca6190b6c833e99096dd0e07111968d8a0623c2848
BLAKE2b-256 checksum
How to use checksums
730fb77ebf3b5da7c450687354ace93e5139a15836d56a95c6e6b8f83831c5e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.5

Release files / nwcommitaverages-2.0.1-py3-none-any.whl

Download URL nwcommitaverages-2.0.1-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0dfb6d73ecc047a8e3b6ec26abb41b089ffdb0dd827e59eee74d09da58740cff
BLAKE2b-256 checksum
How to use checksums
7376b7dff9c6b610f51b4af4703a4b49e23384f6544777da922b1a01b23660fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.5

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page