{ "info": { "author": "source{d}", "author_email": "machine-learning@sourced.tech", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8" ], "description": "
\n\n
\n\n Fast, insightful and highly customizable Git history analysis.
\n \n
\n
\n
\n
\n
\n
\n
\n
\n Overview \u2022\n How To Use \u2022\n Installation \u2022\n Contributions \u2022\n License\n
\n\n--------\n\n\nTable of Contents\n=================\n\n * [Overview](#overview)\n * [Installation](#installation)\n * [Build from source](#build-from-source)\n * [GitHub Action](#github-action)\n * [Contributions](#contributions)\n * [License](#license)\n * [Usage](#usage)\n * [Caching](#caching)\n * [GitHub Action](#github-action-1)\n * [Docker image](#docker-image)\n * [Built-in analyses](#built-in-analyses)\n * [Project burndown](#project-burndown)\n * [Files](#files)\n * [People](#people)\n * [Churn matrix](#overwrites-matrix)\n * [Code ownership](#code-ownership)\n * [Couples](#couples)\n * [Structural hotness](#structural-hotness)\n * [Aligned commit series](#aligned-commit-series)\n * [Added vs changed lines through time](#added-vs-changed-lines-through-time)\n * [Efforts through time](#efforts-through-time)\n * [Sentiment (positive and negative comments)](#sentiment-positive-and-negative-comments)\n * [Everything in a single pass](#everything-in-a-single-pass)\n * [Plugins](#plugins)\n * [Merging](#merging)\n * [Bad unicode errors](#bad-unicode-errors)\n * [Plotting](#plotting)\n * [Custom plotting backend](#custom-plotting-backend)\n * [Caveats](#caveats)\n * [Burndown Out-Of-Memory](#burndown-out-of-memory)\n\n## Overview\n\nHercules is an amazingly fast and highly customizable Git repository analysis engine written in Go. Batteries are included.\nPowered by [go-git](https://github.com/src-d/go-git) and [Babelfish](https://doc.bblf.sh).\n\nThere are two command-line tools: `hercules` and `labours`. The first is a program\nwritten in Go which takes a Git repository and executes a Directed Acyclic Graph (DAG) of [analysis tasks](doc/PIPELINE_ITEMS.md) over the full commit history.\nThe second is a Python script which shows some predefined plots over the collected data. These two tools are normally used together through\na pipe. It is possible to write custom analyses using the plugin system. It is also possible\nto merge several analysis results together - relevant for organizations. \nThe analyzed commit history includes branches, merges, etc.\n\nHercules has been successfully used for several internal projects at [source{d}](https://sourced.tech).\nThere are blog posts: [1](https://blog.sourced.tech/post/hercules-v4), [2](https://blog.sourced.tech/post/hercules) and\na [presentation](http://vmarkovtsev.github.io/gowayfest-2018-minsk/). Please [contribute](#contributions)\nby testing, fixing bugs, adding [new analyses](https://github.com/src-d/hercules/issues?q=is%3Aissue+is%3Aopen+label%3Anew-analysis), or coding swagger!\n\n\nThe DAG of burndown and couples analyses with UAST diff refining. Generated with hercules --burndown --burndown-people --couples --feature=uast --dry-run --dump-dag doc/dag.dot https://github.com/src-d/hercules
torvalds/linux line burndown (granularity 30, sampling 30, resampled by year). Generated with hercules --burndown --first-parent --pb https://github.com/torvalds/linux | labours -f pb -m burndown-project in 1h 40min.
Wireshark top 20 devs - overwrites matrix
\n\n```\nhercules --burndown --burndown-people [--people-dict=/path/to/identities]\nlabours -m overwrites-matrix\n```\n\nBeside the burndown information, `--burndown-people` collects the added and deleted line statistics per\ndeveloper. Thus it can be visualized how many lines written by developer A are removed by developer B.\nThis indicates collaboration between people and defines expertise teams.\n\nThe format is the matrix with N rows and (N+2) columns, where N is the number of developers.\n\n1. First column is the number of lines the developer wrote.\n2. Second column is how many lines were written by the developer and deleted by unidentified developers\n(if `--people-dict` is not specified, it is always 0).\n3. The rest of the columns show how many lines were written by the developer and deleted by identified\ndevelopers.\n\nThe sequence of developers is stored in `people_sequence` YAML node.\n\n#### Code ownership\n\n\nEmber.js top 20 devs - code ownership
\n\n```\nhercules --burndown --burndown-people [--people-dict=/path/to/identities]\nlabours -m ownership\n```\n\n`--burndown-people` also allows to draw the code share through time stacked area plot. That is,\nhow many lines are alive at the sampled moments in time for each identified developer.\n\n#### Couples\n\n\ntorvalds/linux files' coupling in Tensorflow Projector
\n\n```\nhercules --couples [--people-dict=/path/to/identities]\nlabours -m couples -ohercules --shotness --pb https://github.com/pallets/jinja | labours -m couples -f pb
tensorflow/tensorflow aligned commit series of top 50 developers by commit number.
\n\n```\nhercules --devs [--people-dict=/path/to/identities]\nlabours -m devs -otensorflow/tensorflow added and changed lines through time.
\n\n```\nhercules --devs [--people-dict=/path/to/identities]\nlabours -m old-vs-new -okubernetes/kubernetes efforts through time.
\n\n```\nhercules --devs [--people-dict=/path/to/identities]\nlabours -m devs-efforts -oIt can be clearly seen that Django comments were positive/optimistic in the beginning, but later became negative/pessimistic.hercules --sentiment --pb https://github.com/django/django | labours -m sentiment -f pb