Skip to content

Commit

Permalink
adding if keys are blank take out
Browse files Browse the repository at this point in the history
  • Loading branch information
paigerube14 committed Mar 20, 2024
1 parent 58b1725 commit 15ed3a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions orion.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ def orion(**kwargs):
logging.info("No UUID present for given metadata")
sys.exit()
else:
print("baseline" + str(baseline))
uuids = re.split(' |,',baseline)
print("uuids" + str(uuids))
uuids.append(uuid)
if metadata["benchmark.keyword"] == "k8s-netperf" :
index = "k8s-netperf"
Expand All @@ -99,8 +97,10 @@ def orion(**kwargs):
lambda left, right: pd.merge(left, right, on="uuid", how="inner"),
dataframe_list,
)

csv_name = kwargs["output"].split(".")[0]+"-"+test['name']+".csv"
match.save_results(
merged_df, csv_file_path=kwargs["output"].split(".")[0]+"-"+test['name']+".csv"
merged_df, csv_file_path=csv_name
)

if kwargs["hunter_analyze"]:
Expand Down
9 changes: 6 additions & 3 deletions utils/orion_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def filter_metadata(uuid,match,logger):
dict: dictionary of the metadata
"""

test= match.get_metadata_by_uuid(uuid)
test = match.get_metadata_by_uuid(uuid)
metadata = {
'platform': '',
'clusterType': '',
Expand All @@ -154,8 +154,11 @@ def filter_metadata(uuid,match,logger):
metadata[k] = v
metadata['benchmark.keyword'] = test['benchmark']
metadata["ocpVersion"] = str(metadata["ocpVersion"])
logger.debug('metadata' + str(metadata))
return metadata

#Remove any keys that have blank values
no_blank_meta = {k: v for k, v in metadata.items() if v}
logger.debug('No blank metadata dict: ' + str(no_blank_meta))
return no_blank_meta



Expand Down

0 comments on commit 15ed3a2

Please sign in to comment.