Skip to content

Instantly share code, notes, and snippets.

View vchrombie's full-sized avatar

Venu Vardhan Reddy Tekula vchrombie

View GitHub Profile
/home/p0tt3r/chaoss/sources/VENV_DIR/bin/python /home/p0tt3r/chaoss/sources/grimoirelab-sirmordred/utils/micro.py --enrich --cfg ./setup.cfg --backends gitlabqm:issue
2020-06-16 18:22:11,780 Reading projects data from ./projects.json
2020-06-16 18:22:21,812 [gitlabqm:issue] enrichment phase starts
2020-06-16 18:22:21,890 [gitlabqm:issue] enrichment starts for https://gitlab.com/amfoss/cms-mobile
2020-06-16 18:22:22,216 Error enriching raw from gitlabqm (https://gitlab.com/amfoss/cms-mobile): 'id'
Traceback (most recent call last):
File "/home/p0tt3r/chaoss/sources/grimoirelab-elk/grimoire_elk/elk.py", line 530, in enrich_backend
enrich_count = enrich_items(ocean_backend, enrich_backend)
File "/home/p0tt3r/chaoss/sources/grimoirelab-elk/grimoire_elk/elk.py", line 318, in enrich_items
total = enrich_backend.enrich_items(ocean_backend)
@vchrombie
vchrombie / generate-es-index-schema.py
Last active March 22, 2021 18:30
tool to generate schema file of the elasticsearch index
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 CHAOSS
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
def __get_reactions(self, item):
reactions = ()
item_reactions = item.get('award_emoji_data', [])
for item in item_reactions:
reaction = {
'type': item['name'],
'count': sum(1 for i in item_reactions if i['name'] == item['name'])
}
/home/p0tt3r/chaoss/sources/VENV_DIR/bin/python /home/p0tt3r/chaoss/sources/grimoirelab-sirmordred/utils/micro.py --enrich --cfg ./setup.cfg --backends gitlabcomments:issue gitlabcomments:merge
2020-06-07 21:41:16,656 Reading projects data from ./projects.json
2020-06-07 21:41:26,699 [gitlabcomments:issue] enrichment phase starts
2020-06-07 21:41:26,887 [gitlabcomments:issue] enrichment starts for https://gitlab.com/amfoss/cms
2020-06-07 21:41:27,191 Name, email and username are none in gitlabcomments
2020-06-07 21:41:28,198 85 items inserted for GitLab
2020-06-07 21:41:28,198 [gitlabcomments] Done enrichment for https://gitlab.com/amfoss/cms
2020-06-07 21:41:28,199 [gitlabcomments:issue] enrichment finished for https://gitlab.com/amfoss/cms
2020-06-07 21:41:28,199 [gitlabcomments:issue] enrichment starts for https://gitlab.com/amfoss/cms-mobile
2020-06-07 21:41:28,773 Name, email and username are none in gitlabcomments
"reactions": {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 1,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
"reactions": {
"+1": 0,
"-1": 0,
"confused": 0,
"eyes": 1,
"heart": 0,
"hooray": 0,
"laugh": 0,
"rocket": 0,
"total_count": 1,
@vchrombie
vchrombie / scava-metrics
Last active June 3, 2020 11:55
prosoul data format of index
{
"scava-metrics": {
"aliases": {},
"mappings": {
"items": {
"dynamic_templates": [
{
"notanalyzed": {
"match": "*",
"match_mapping_type": "string",
{
"_index" : "scava-metrics_scores",
"_type" : "item",
"_id" : "OtRLlmoBsN4hsIriFChp",
"_score" : 1.0,
"_source" : {
"metric" : "Threads",
"project" : "netty",
"goal" : "activity",
"score_Threads" : 5,
classDiagram
ProsoulModel <|-- QualityModel
ProsoulModel <|-- Goal
ProsoulModel <|-- Attribute
ProsoulModel <|-- Metric
ProsoulModel <|-- Factoid
ProsoulModel <|-- MetricData
ProsoulModel <|-- DataSourceType
MetricData "1" -- "*" Metric : data (metric)
DataSourceType "1" -- "*" Metric : data_source_type (metric)
num_after should be adjusted according to the logic in fetch_items
actual_total_msgs = 12
in the stream 'importlib'
---
num_after : 2
ids of messages which are fetched