nwcommitaverages
Introduction
This packages consists of the following modules:
nwcommitaveragesis an application designed to calculate the average time between Git commits.nwcommitaveragescliis a command-line application built on the top ofnwcommitaverages.
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:
- Install
pipandvenv:
sudo apt install python3-pip python3.12-venv
- Create a virtual environment:
python3 -m venv /tmp/nwcommitaverages
source /tmp/nwcommitaverages/bin/activate
- Download and install the package:
pip install nwcommitaverages
- 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.
>>>
- Try out if the library works:
from nwcommitaverages import CommitAverageCalculator
ca_calculator : CommitAverageCalculator = CommitAverageCalculator()
- Exit from the interactive Python environment:
exit()
- Try out if the CLI application works:
nwcommitaveragescli
- Deactivate and delete the virtual environment:
deactivate
rm -rf /tmp/nwcommitaverages
- 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.
Links
- Source: https://github.com/numbworks/nwcommitaverages
- License: https://github.com/numbworks/nwcommitaverages/blob/master/LICENSE
Total Downloads (PyPi)
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)
| File | Size | Uploaded | |
|---|---|---|---|
| nwcommitaverages-2.0.1.tar.gz | 10.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|