From 0c014f17623c35f7df69be4e7096968081898e41 Mon Sep 17 00:00:00 2001 From: ChristianZaccaria Date: Wed, 13 Mar 2024 12:31:36 +0000 Subject: [PATCH] Fix warning from pytest and increase pretty_print coverage --- pyproject.toml | 1 - src/codeflare_sdk/utils/pretty_print.py | 16 ++++------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 953ce0f69..41782c4ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,4 +54,3 @@ markers = [ "kind", "openshift" ] -timeout = 900 diff --git a/src/codeflare_sdk/utils/pretty_print.py b/src/codeflare_sdk/utils/pretty_print.py index ca371182c..0bdc185de 100644 --- a/src/codeflare_sdk/utils/pretty_print.py +++ b/src/codeflare_sdk/utils/pretty_print.py @@ -70,15 +70,11 @@ def print_cluster_status(cluster: RayCluster): ) name = cluster.name dashboard = cluster.dashboard - # owned = bool(cluster["userOwned"]) - owned = True #'table0' to display the cluster name, status, url, and dashboard link table0 = Table(box=None, show_header=False) - if owned: - table0.add_row("[white on green][bold]Name") - else: - table0.add_row("") + + table0.add_row("[white on green][bold]Name") table0.add_row("[bold underline]" + name, status) table0.add_row() # fixme harcded to default for now @@ -119,15 +115,11 @@ def print_clusters(clusters: List[RayCluster]): memory = str(cluster.worker_mem_min) + "~" + str(cluster.worker_mem_max) cpu = str(cluster.worker_cpu) gpu = str(cluster.worker_gpu) - # owned = bool(cluster["userOwned"]) - owned = True #'table0' to display the cluster name, status, url, and dashboard link table0 = Table(box=None, show_header=False) - if owned: - table0.add_row("[white on green][bold]Name") - else: - table0.add_row("") + + table0.add_row("[white on green][bold]Name") table0.add_row("[bold underline]" + name, status) table0.add_row() # fixme harcded to default for now