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

Uploaded Source

Built Distribution

wecoded-0.2.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file wecoded-0.2.0.tar.gz.

File metadata

  • Download URL: wecoded-0.2.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for wecoded-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6712b0545bcd8e25f2e277f465a5eee98c22fddfb5c510be01450c5056769bcb
MD5 a4957ffb2b2a85054c4544e59c535fc3
BLAKE2b-256 a1ff952228f71183bb5d7f0263deaef51720a5e0aadd18eaac59802ef2f029de

See more details on using hashes here.

File details

Details for the file wecoded-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: wecoded-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for wecoded-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87e9b9259f678c98fc75f3b2baea3897000d03dab93491966515403760ecc3b2
MD5 56169e2a5d1f20e20da77807b97fa3a7
BLAKE2b-256 be0507ffcc465da43e37bb007407e8b4de038f1b32e7b5483da84a7fb018b0e5

See more details on using hashes here.

Supported by

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