Skip to content

Commit

Permalink
added tabulate
Browse files Browse the repository at this point in the history
Signed-off-by: Shashank Reddy Boyapally <sboyapal@redhat.com>
  • Loading branch information
shashank-boyapally committed Mar 25, 2024
1 parent 3090000 commit d282e7e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
19 changes: 10 additions & 9 deletions orion.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from functools import reduce
import logging
import os
from tabulate import tabulate
import pyshorteners

import click
import pandas as pd
Expand Down Expand Up @@ -66,10 +68,10 @@ def orion(config, debug, output, hunter_analyze):
print("No UUID present for given metadata")
sys.exit()

if metadata["benchmark.keyword"] == "k8s-netperf" :
if metadata["benchmark.keyword"] == "k8s-netperf":
index = "k8s-netperf"
ids = uuids
elif metadata["benchmark.keyword"] == "ingress-perf" :
elif metadata["benchmark.keyword"] == "ingress-perf":
index = "ingress-performance"
ids = uuids
else:
Expand Down Expand Up @@ -100,13 +102,12 @@ def orion(config, debug, output, hunter_analyze):
(run, match.get_metadata_by_uuid(run)["buildUrl"])
for run in change_uuids
]
print("\n")
print(
"\n\n".join(
f"{run}=======>\033]8;;{buildUrl}\033\\click here for build URL\033]8;;\033\\"
for run, buildUrl in change_runs
)
)
shortener = pyshorteners.Shortener()
data = [
(item1, shortener.tinyurl.short(item2)) for item1, item2 in change_runs
]
table = tabulate(data, headers=["uuid", "buildUrl"], tablefmt="grid")
logger.info("\n%s",table)


if __name__ == "__main__":
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ PyYAML==6.0.1
six==1.16.0
tzdata==2023.4
urllib3==1.26.18
pyshorteners==1.0.1

0 comments on commit d282e7e

Please # to comment.