Skip to content

Commit

Permalink
Add % at the end of the summary
Browse files Browse the repository at this point in the history
  • Loading branch information
pvk-developer committed Oct 2, 2024
1 parent 6709fd1 commit a55078d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/benchmark/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,24 @@ def compare_and_store_results_in_gdrive():
else:
summary[name] = df['percentage_supported']

summary['average'] = summary[list(results)].mean(axis=1)
for col in summary.columns():
if col not in ('sdtype', 'dtype'):
summary[col] = summary[col].apply(lambda x: f'{x}%')

sorted_results['Summary'] = summary

slack_messages = []
mark_results = {}
exit_code = 0
for key, value in comparison_results.items():
if not value.empty:
sorted_results[key] = value
if key == 'unsupported_dtypes':
slack_messages.append(':fire: New unsupported DTypes!')
mark_results['#EB9999'] = value
exit_code = 1

elif key == 'new_supported_dtypes':
slack_messages.append(':party_blob: New DTypes supported!')
mark_results['#B7D7A8'] = value
Expand All @@ -215,6 +223,7 @@ def compare_and_store_results_in_gdrive():
)
slack_message = '\n'.join(slack_messages)
post_slack_message('sdv-alerts-debug', slack_message)
sys.exit(exit_code)


if __name__ == '__main__':
Expand Down

0 comments on commit a55078d

Please sign in to comment.