Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
Signed-off-by: Isaac Milarsky <[email protected]>
  • Loading branch information
IsaacMilarky committed Mar 20, 2024
1 parent 51f119a commit 2363c84
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions scripts/gen_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
1 change: 1 addition & 0 deletions scripts/gen_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
9 changes: 8 additions & 1 deletion scripts/metricsLib/metrics_data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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]
Expand All @@ -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):
"""
Expand Down

0 comments on commit 2363c84

Please sign in to comment.