Welcome! This repository contains tools for visualizing changes to code over time.
In order to run our tools properly, you're going to need a few things. But don't worry! Below, we explain how to get all of them:
- A working version of Python. The tools were developed on Python 2.7.3, and in principle should work with Pyhon 3.x installations, but I can't make any guarantees.
- The GitPython and pystache libraries for Python (installation instructions below)
- A code file of interest that's currently under version control in a Git repository
- A stable, recent release of a major browser (we try to test on Chrome, Safari, and Firefox, in that order)
You'll need the latest version of R (>= 2.15.2).
You'll also need to install the following dependent libraries from CRAN:
- ggplot2
- plyr
- lubridate
-
Make sure you've got Git,
-
Then, open a terminal, clone our stuff, and navigate to it:
$ cd path/to/where/you/want/our/stuff $ git clone https://github.com/briandk/gitvisualizations.git $ cd gitvisualizations
-
Make sure you have Python Installed
$ which python # should return python's location, if it's installed
-
Install pip if you haven't got it already
$ which pip # should return pip's location, if it's installed
-
From your clone of our project directory, use pip to install the required python dependencies for this project
$ pip install -r requirements.txt
Assuming your terminal prompt is still in the gitvisualizations
project directory, you can start using RepoStatistics.py
like so:
$ python RepoStatistics/RepoStatistics.py path_to_another_git_repository
You can also specify delimiting dates and times, using the --since
and --until
flags. They offer enormous flexibility
$ python python RepoStatistics/RepoStatistics.py your_repo --since='2011-01-27'
$ python RepoStatistics/RepoStatistics.py your_repo --until='yesterday'
You can even combine both flags (naturally):
$ python RepoStatistics/RepoStatistics.py your_repo --since='2011-01-27' --until='yesterday'
In this plot, the blue ribbon bins the total number of commits per day. The red curve shows the cumulative sum of commits over time.
This plot shows a small multiple for each unique file in the project. The green ribbon represents total number of lines added per day. The orange ribbon is total number of deletions per day.
Please give us feedback! We'd love to hear your gripes, thrill stories, and feature requests. Just open an issue to get in touch. Thanks!