Skip to main content

Git commit lines graph

Project description

Git Commit Lines Graph

PyPI

A small python script to visualize the number of lines in a project, as a function of time.

Install

uv tool install git-lines-graph   
# OR
python3 -m pip install git-lines-graph

Usage

Run: git-lines-graph [-b BRANCH] [GIT-DIR]

Call with an optional git project directory. You can also specify a branch to scan; other wise the branch currently checked in is used.

Dependencies

  • GitPython to interact with git.
  • matplotlib for plotting.
  • pandas for data manipulation.

How Does It Work

The code goes over all commits messages and looks for the number of lines added/removed and keeps an updated count. Caveat: the lines reported in git commit messages are only a proxy for the true number of lines of code. It could be way off in projects in which there are data artifacts such as big data files. One solution is to loop over all commits, checkout the commit and do a wc over all files that are considered to be code files. But that's slower and could be dangerous in dirty projects.

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_lines_graph-2.1.0.tar.gz (105.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_lines_graph-2.1.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file git_lines_graph-2.1.0.tar.gz.

File metadata

  • Download URL: git_lines_graph-2.1.0.tar.gz
  • Upload date:
  • Size: 105.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.16

File hashes

Hashes for git_lines_graph-2.1.0.tar.gz
Algorithm Hash digest
SHA256 6642a9f319858e9b513377b46c67d48217d1a10eedb7535fb5d43a713e64fde2
MD5 d35bdd8f70d150355cf2144664c04ea2
BLAKE2b-256 c2f1a4b0e772b4be962d40027c243a67834ed98699102262b640d4971c433f4a

See more details on using hashes here.

File details

Details for the file git_lines_graph-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for git_lines_graph-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39fc8cb00b3934b26db94102a683e49b5ab375c5b17ebd9a775b748fb8ddb1b4
MD5 42c4f61ec5cc04a84cfce82cd192bb9b
BLAKE2b-256 56a469e2998d477a118687ac56642ee868a8c1202535d756c18432901e6bfd8e

See more details on using hashes here.

Supported by

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