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
0
200
GrimoireLab, a Python toolset for software development analytics - FOSDEM 2017
Slides for FOSDEM 2017 talk at Python DevRoom about GrimoireLab
Bitergia
February 05, 2017
Tweet
Share
More Decks by Bitergia
See All by Bitergia
Building and Supporting Open Source Communities through Metrics
bitergia
0
31
Defining the limits of Risk
bitergia
0
45
Present and Future of GrimoireLab
bitergia
0
33
InnerSource Commons
bitergia
0
78
Collaboration as Health Indicator
bitergia
0
97
La estrella de mi comunidad es un bot. ¿Dónde están los humanos?
bitergia
0
80
IoT Projects in FLOSS Foundations, a report based on community data
bitergia
0
88
Contributor Leaderboards to Incentivize Good Community Citizenship
bitergia
0
100
FreeScout: Cómo montar un departamento de soporte/atención al cliente con software libre
bitergia
0
300
Other Decks in Technology
See All in Technology
多様なロール経験が導いたエンジニアキャリアのナビゲーション
coconala_engineer
1
190
PR TIMESにおけるNext.jsとcacheの付き合い方
apple_yagi
2
330
アップデート紹介:AWS Data Transfer Terminal
stknohg
PRO
0
110
Kubeshark で Kubernetes の Traffic を眺めてみよう/Let's Look at k8s Traffic with Kubeshark
kota2and3kan
2
300
pmconf2024_UPSIDER
upsider_tech
0
8k
開発者向けツールを魔改造してセキュリティ診断ツールを作っている話 - 第1回 セキュリティ若手の会 LT
pizzacat83
0
410
プロダクトの爆速開発を支える、 「作らない・削る・尖らせる」技術
applism118
10
9.4k
権威ドキュメントで振り返る2024 #年忘れセキュリティ2024
hirotomotaguchi
0
250
2024/12/05 AITuber本著者によるAIキャラクター入門 - AITuberの基礎からソフトウェア設計、失敗談まで
sr2mg4
2
600
Will Positron accelerate us?
lycorptech_jp
PRO
1
130
マルチプロダクト開発の現場でAWS Security Hubを1年以上運用して得た教訓
muziyoshiz
1
110
うまくいく! を実現するための質問力 / It works! The Power of Questions to Make It Happen
bitkey
PRO
1
210
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
We Have a Design System, Now What?
morganepeng
51
7.3k
KATA
mclloyd
29
14k
Making Projects Easy
brettharned
116
5.9k
Gamification - CAS2011
davidbonilla
80
5.1k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Writing Fast Ruby
sferik
627
61k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Producing Creativity
orderedlist
PRO
341
39k
Building an army of robots
kneath
302
44k
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