Commit 6e3e5c63 authored by Joanne Hugé's avatar Joanne Hugé

Add ignored metadata array and ignore board names

parent e84136dc
......@@ -30,6 +30,7 @@ class MeasureSetHandler:
graphs_dir = "{}/graphs".format(measures_dir)
measure_sets_file_name = "measure_sets.json"
measure_sets_path = measures_dir + "/" + measure_sets_file_name
ignored_metadata = ["board"]
def __init__(self):
with open(MeasureSetHandler.measure_sets_path) as measure_sets_file:
......@@ -233,22 +234,24 @@ class MeasureSetHandler:
# Generate the metadata mask, by grouping the identical metadata
for measure in measures[1:]:
for metadata_name in measure.metadata:
# If it is not already in the metadata mask
if metadata_name not in metadata_mask:
# If there are two different metadata, they are added to the mask
if measure.metadata[metadata_name] != first_metadata[metadata_name]:
metadata_mask.append(metadata_name)
if metadata_name not in self.ignored_metadata:
# If it is not already in the metadata mask
if metadata_name not in metadata_mask:
# If there are two different metadata, they are added to the mask
if measure.metadata[metadata_name] != first_metadata[metadata_name]:
metadata_mask.append(metadata_name)
metadata_masks[mtype] = metadata_mask
# Compute the identical metadata
common_metadata = []
for metadata_name in first_metadata:
if metadata_name not in metadata_mask:
if metadata_name in MeasureSet.abbreviations:
common_metadata.append("{}: {}".format(MeasureSet.abbreviations[metadata_name], first_metadata[metadata_name]))
else:
common_metadata.append("{}: {}".format(metadata_name, first_metadata[metadata_name]))
if metadata_name not in self.ignored_metadata:
if metadata_name not in metadata_mask:
if metadata_name in MeasureSet.abbreviations:
common_metadata.append("{}: {}".format(MeasureSet.abbreviations[metadata_name], first_metadata[metadata_name]))
else:
common_metadata.append("{}: {}".format(metadata_name, first_metadata[metadata_name]))
common_metadata_strs[mtype] = ", ".join(common_metadata)
return (metadata_masks, common_metadata_strs)
......@@ -267,7 +270,8 @@ class MeasureSetHandler:
report.write("### Description of the metadata associated to each test\n\n")
for abbr_name in MeasureSet.metadata_descriptions:
report.write("* **{}**: {}\n".format(abbr_name, MeasureSet.metadata_descriptions[abbr_name]))
if abbr_name not in self.ignored_metadata:
report.write("* **{}**: {}\n".format(abbr_name, MeasureSet.metadata_descriptions[abbr_name]))
report.write("\n")
for mtype in self.measure_sets:
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment