diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000000..8884989de8 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "metrics", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} diff --git a/scripts/gen_graphs.py b/scripts/gen_graphs.py index 04ecc86227..a84d91a020 100644 --- a/scripts/gen_graphs.py +++ b/scripts/gen_graphs.py @@ -92,6 +92,7 @@ def generate_time_xy_issue_graph(oss_entity,data_key): """ graph_data_dict = oss_entity.metric_data[data_key] + print(graph_data_dict) dates_list = [record[0] for record in graph_data_dict] issues_list = [record[1] for record in graph_data_dict] diff --git a/scripts/gen_reports.py b/scripts/gen_reports.py index eaab334590..26674de269 100644 --- a/scripts/gen_reports.py +++ b/scripts/gen_reports.py @@ -48,6 +48,7 @@ def get_heading_report_values(headings, oss_entity): report_values = {} for heading in headings: + print(oss_entity.metric_data) prev_record = oss_entity.metric_data[heading] if heading in oss_entity.previous_metric_data.keys(): diff --git a/scripts/metricsLib/metrics_data_structures.py b/scripts/metricsLib/metrics_data_structures.py index 579968d648..61addec3bb 100644 --- a/scripts/metricsLib/metrics_data_structures.py +++ b/scripts/metricsLib/metrics_data_structures.py @@ -316,6 +316,8 @@ class ListMetric(BaseMetric): def __init__(self, name, needed_params, endpoint_url, return_values, token=None, method='GET'): super().__init__(name, needed_params, endpoint_url, return_values, token=token, method=method) + + self.tuple_flag = True def get_values(self, params=None): metric_json = self.hit_metric(params=params) @@ -341,7 +343,10 @@ def get_values(self, params=None): elem.append(item[sub_label]) #print(elem) # Add up sublists and assign to return label key - to_return[return_label].extend(elem) + if not self.tuple_flag: + to_return[return_label].extend(elem) + else: + to_return[return_label].append(elem) except TypeError: # return_label key is assigned to list of extracted api_label value to_return[return_label] = [item[api_label] @@ -366,6 +371,8 @@ class RangeMetric(ListMetric): def __init__(self, name, needed_params, endpoint_url, return_values, token=None, method='GET'): super().__init__(name, needed_params, endpoint_url, return_values, token=token, method=method) + + self.tuple_flag = False def get_values(self, params=None): """