Skip to main content

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

Metadata

Release files for wecoded 0.2.0

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

Source distribution (sdist)

Source distribution for wecoded 0.2.0
File Size Uploaded
wecoded-0.2.0.tar.gz 4.5 kB Details

Built distribution (wheel)

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

Total release size: 9.6 kB

Release files / wecoded-0.2.0.tar.gz

Download URL wecoded-0.2.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6712b0545bcd8e25f2e277f465a5eee98c22fddfb5c510be01450c5056769bcb
BLAKE2b-256 checksum
How to use checksums
a1ff952228f71183bb5d7f0263deaef51720a5e0aadd18eaac59802ef2f029de
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / wecoded-0.2.0-py3-none-any.whl

Download URL wecoded-0.2.0-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87e9b9259f678c98fc75f3b2baea3897000d03dab93491966515403760ecc3b2
BLAKE2b-256 checksum
How to use checksums
be0507ffcc465da43e37bb007407e8b4de038f1b32e7b5483da84a7fb018b0e5
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.2.0 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