New GrimoireLab packages! (and how to use them)

We’ve just uploaded to pypi a new collection of GrimoireLab Python packages suitable for direct installation with pip. Please, upgrade your virtual environments!!!

These packages allow for a very easy use of most GrimoireLab tools. For example, assuming you have ElasticSearch and Kibana installed locally (or available as cloud services), producing a fairly complete software development dashboard from scratch for a git project is just a matter of running a few commands.


We can just start by creating and activating a fresh Python3 virtual environment:

% python3 -m venv /tmp/grimoirelab
% source /tmp/grimoirelab/bin/activate
(grimoirelab) %

Now, we install grimoire-elk, the package which provides (the standalone tool to retrieve data from repositories, and store it in ElasticSearch) and grimoire-kidash, which provides kidash (the tool to upload dashboards to Kibana).

(grimoirelab) % pip install grimoire-elk
(grimoirelab) % pip install grimoire-kidash

Now, let’s run to retrieve data from both the git repository and the GitHub API (issues and pull requests). We will use the Perceval GitHub project as our guinea pig:

(grimoirelab) % --enrich --index git_raw --index-enrich git \
  -e http://localhost:9200 --no_inc --debug \
$ (grimoireelk) --enrich --index github_raw --index-enrich github \
  -e http://localhost:9200 --no_inc --debug \
  github grimoirelab perceval \
  -t XXX --sleep-for-rate

(being XXX your GitHub API token).

Finally, upload the corresponding dashboards, that you need to download first as JSON documents:

(grimoireelk) $ --elastic_url-enrich http://localhost:9200 \
--import /tmp/git-dashboard.json

(grimoireelk) $ --elastic_url-enrich http://localhost:9200 \
--import /tmp/git-dashboard.json

(assuming those JSON documents are in /tmp)

See the chapter Creating a simple dashboard in the GrimoireLab Training manual for more details, including how to get the GitHub API key, and where to find the JSON documents for the dashboards.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s