Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
GrimoireLab, a Python toolset for software deve...
Search
Bitergia
February 05, 2017
Technology
260
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GrimoireLab, a Python toolset for software development analytics - FOSDEM 2017
Slides for FOSDEM 2017 talk at Python DevRoom about GrimoireLab
Bitergia
February 05, 2017
More Decks by Bitergia
See All by Bitergia
Building and Supporting Open Source Communities through Metrics
bitergia
0
83
Defining the limits of Risk
bitergia
0
120
Present and Future of GrimoireLab
bitergia
0
110
InnerSource Commons
bitergia
0
120
Collaboration as Health Indicator
bitergia
0
150
La estrella de mi comunidad es un bot. ¿Dónde están los humanos?
bitergia
0
140
IoT Projects in FLOSS Foundations, a report based on community data
bitergia
0
150
Contributor Leaderboards to Incentivize Good Community Citizenship
bitergia
0
140
FreeScout: Cómo montar un departamento de soporte/atención al cliente con software libre
bitergia
0
600
Other Decks in Technology
See All in Technology
「ちゃんとやっている」は独りよがりだった ― 不安に寄り添うインシデント対応へ / Towards incident response that addresses anxieties
chmikata
1
530
どうして今サーバーサイドKotlinを選択したのか
nealle
0
200
フルAIで個人開発して学んだあれこれ / yuruai vol.1
isaoshimizu
0
180
ゼロをイチにする仕事が終わったあと
smasato
0
290
次世代ランサムウェア対策の考察 / 20260704 Mitsutoshi Matsuo
shift_evolve
PRO
5
1.7k
プライバシー保護の理論と実践
lycorptech_jp
PRO
1
240
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
8.3k
AI時代のエンジニアキャリアについて今一度考える
sakamoto_582
1
1.2k
AWS Summit の片隅で、体育座りしながらコミュニティがにぎわう理由を考えた
k_adachi_01
2
350
勉強会企画をアプリで構造化してみた 〜そこで見えた、AIとの付き合い方〜 / I've structured a study group plan using an app.
pauli
0
310
なぜ人は自分のプロジェクトを 「なんちゃってアジャイル」と 自嘲するのか
kozotaira
0
250
NDIAS CTF 2026 問題解説会資料
bata_24
0
180
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1k
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
450
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
180
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
2
290
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.7k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Transcript
GrimoireLab a Python toolset for software development analytics Jesus M.
Gonzalez-Barahona (URJC) @jgbarah jgb at bitergia dot com speakerdeck.com/bitergia FOSDEM 2017, Python devroom Brussels (Belgium) February 5th 2017
Outline Some context The software doing the magic Let’s be
practical Your turn
Some context
/me Like five years ago I was having coffees with
the gang of Bitergia founders Involved in the company since then bitergia.com I work at Universidad Rey Juan Carlos... ...researching about software development gsyc.es/~jgb My two hats:
Building Software Development Dashboards cauldron.io
The software doing the magic
Architecture Original Data Sources Retrieval Perceval Enrichment GrimoireELK Visualization Kibiter
(Kibana4/5) ElasticSearch GrimoireLab component
GrimoireLab grimoirelab.github.io
GrimoireLab grimoirelab.github.io
GrimoireLab Training Tutorial jgbarah.gitbooks.io/grimoirelab-training
Let’s be practical
Architecture Original Data Sources Retrieval Perceval Enrichment GrimoireELK Visualization Kibiter
(Kibana4/5) ElasticSearch GrimoireLab component
Retrieving data with Perceval In a Python3 environment… $ pip3
install perceval $ perceval git https://github.com/grimoirelab/perceval.git [2016-10-03 00:47:46,632] - Sir Perceval is on his quest. [2016-10-03 00:47:46,633] - Fetching commits: 'https://github.com/grimoirelab/perceval.git' git repository from 1970-01-01 00:00:00+00:00; all branches { "backend_name": "Git", "backend_version": "0.3.0", "data": { "Author": "Santiago Due\u00f1as <
[email protected]
>", "AuthorDate": "Tue Aug 18 18:08:27 2015 +0200", "Commit": "Santiago Due\u00f1as <
[email protected]
>", "CommitDate": "Tue Aug 18 18:08:27 2015 +0200", "commit": "dc78c254e464ff334892e0448a23e4cfbfc637a3", ….
Retrieving data with Perceval from Python from perceval.backends.core.github import GitHub
# GitHub object for owner / repo, repo_dir for cloning repo = GitHub(owner=owner, repository=repo, api_token=args.token) # fetch all issues/pull requests for item in repo.fetch(): if 'pull_request' in item['data']: kind = 'Pull request' else: kind = 'Issue' print(item['data']['number'], ':', kind)
Perceval Backends grimoirelab.github.io
Architecture Original Data Sources Retrieval Perceval Enrichment GrimoireELK Visualization Kibiter
(Kibana4/5) ElasticSearch GrimoireLab component
Creating indexes for a dashboard $ pip install grimoire-elk $
pip install grimoire-kidash $ p2o.py --enrich --index git_raw --index-enrich git \ -e http://localhost:9200 --no_inc --debug \ git https://github.com/grimoirelab/perceval.git $ kidash.py -e http://localhost:9200 \ --import git-dashboard.json Results: Raw index: git_raw Kibana dashboard Enriched index: git
Architecture Original Data Sources Retrieval Perceval Enrichment GrimoireELK Visualization Kibiter
(Kibana4/5) ElasticSearch GrimoireLab component
Querying ElasticSearch API $ curl -XGET "http://elasticsearch_url/git/_search/?size=1&pretty" {... "hits" :
{ "total" : 407, "hits" : [ { "_index" : "commits", "_type" : "summary", "_id" : "AVfPp9Po5xUyv5saVPKU", "_score" : 1.0, "_source" : { "hash" : "d1253dd9876bb76e938a861acaceaae95241b46d", "commit" : "Santiago Dueñas <
[email protected]
>", "author" : "Santiago Dueñas <
[email protected]
>", "author_date" : "Wed Nov 18 10:59:52 2015 +0100", "files_no" : 3, "commit_date" : "Wed Nov 18 14:41:21 2015 +0100" }} ] } }
Python scripting from elasticsearch import Elasticsearch from elasticsearch_dsl import Search
es = Elasticsearch(["elasticsearch_url”] s = Search(using=es, index=’git’) s = s.filter('range', files={'gt':0}) s = s.filter('range', author_date={'gt': datetime(2016, 7, 1)}) s.aggs.metric('commits', 'cardinality', field='hash') s.aggs.bucket('histogram', 'date_histogram', field='author_date', interval='quarter') by_q = s.execute() for quarter in by_q.to_dict()['aggregations']['histogram']['buckets']: print("Unique commits for quarter starting on ", Quarter['key_as_string'], ": ", quarter['doc_count'])
More details: GrimoireLab Training Tutorial jgbarah.gitbooks.io/grimoirelab-training
Try it live: The Cauldron cauldron.io
Your turn Enjoy! http://grimoirelab.github.io https://jgbarah.gitbooks.io/grimoirelab-training http://caludron.io