Skip to main content

A tool for counting contributed lines by authors on multiple git repositories

Project description

WeCoded

WeCoded is a Python tool for counting contributed lines by authors on multiple git repositories.

Installation

WeCoded requires Python 3.6 (or higher) and can be installed using the pip/pip3 tool

pip3 install wecoded

Usage

WeCoded is run as a command line program with arguments. It performs the cloning of the repositories then it computes and agregates the lines count statistics as a CSV file.

Prerequisites

WeCoded needs the following external tools:

Currently, WeCoded has only be tested on Linux system

Configuration file

WeCoded requires a configuration file defining

  • git repositories to clone and explore
  • authors aliases (optional)

Each repository is defined by a name with an associated URL and an optional revision to checkout. The revision can be a branch name, a tag or even a commit SHA1. If no revision is provided, the default repository branch is checked out.
Aliases for authors can be defined to avoid separate counting of the same author who has commited under various forms of his name (e.g. 'John Doe', 'jdoe', 'J. Doe').

repositories:
  - name: a-repos
    url: https://organization.org/gitrepos/arepos
    revision: v3.2.0
  - name: another-repos
    url: https://organization.org/gitrepos/anotherrepos
  - name: extrarepos
    url: https://company.com/git/extra
    revision: develop

authors:
  - name: 'John Doe'
    aliases: 
      - 'J. Doe'
      - 'jdoe'
  - name: 'Erika Mustermann'
    aliases: 
      - 'emustermann'

Examples of real configuration files are provided in the examples directory.

Command line

To execute the WeCoded tool in a given work directory, run the following command:

wecoded /path/to/work/dir

in this case, WeCoded will try to use a wecoded-config.yaml file in the current directory.

To specify a configuration file path, use the -f / --config-file option

wecoded /path/to/work/dir -f /path/to/wecoded-myconfig.yaml

The complete help on command line arguments can be obtained in a terminal using the wecoded --help command:

usage: wecoded [-h] [-f CONFIG_FILE] [-c] [-s] workpath

A tool for contributions stats by authors on multiple git repositories

positional arguments:
  workpath              the work path

optional arguments:
  -h, --help            show this help message and exit
  -f CONFIG_FILE, --config-file CONFIG_FILE
                        the path to the YAML configuration file (default: /path/to/wecoded-config.yaml)
  -c, --no-clone        disable the cloning of remote repositories
  -s, --no-stats        disable the computation of stats

Author and License

The WeCoded package is developped by Jean-Christophe Fabre.
it is distributed under the terms of the MIT license

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

wecoded-0.2.0.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

wecoded-0.2.0-py3-none-any.whl (5.2 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