@@ -110,7 +110,7 @@ def down(self):
110110 oc .invoke ("delete" , ["AppWrapper" , self .app_wrapper_name ])
111111 self .config .auth .logout ()
112112
113- def status (self , print_to_console : bool = True ):
113+ def status (self , print_to_console : bool = True ): # pragma: no cover
114114 """
115115 TO BE UPDATED: Will soon return (and print by default) the cluster's
116116 status, from AppWrapper submission to setup completion. All resource
@@ -151,7 +151,7 @@ def cluster_dashboard_uri(self, namespace: str = "default") -> str:
151151 return "Dashboard route not available yet. Did you run cluster.up()?"
152152
153153 # checks whether the ray cluster is ready
154- def is_ready (self , print_to_console : bool = True ):
154+ def is_ready (self , print_to_console : bool = True ): # pragma: no cover
155155 """
156156 TO BE DEPRECATED: functionality will be added into cluster.status().
157157 """
@@ -228,15 +228,17 @@ def job_logs(self, job_id: str) -> str:
228228 return client .get_job_logs (job_id )
229229
230230
231- def get_current_namespace () -> str :
231+ def get_current_namespace () -> str : # pragma: no cover
232232 """
233233 Returns the user's current working namespace.
234234 """
235235 namespace = oc .invoke ("project" , ["-q" ]).actions ()[0 ].out .strip ()
236236 return namespace
237237
238238
239- def list_all_clusters (namespace : str , print_to_console : bool = True ):
239+ def list_all_clusters (
240+ namespace : str , print_to_console : bool = True
241+ ): # pragma: no cover
240242 """
241243 Returns (and prints by default) a list of all clusters in a given namespace.
242244 """
@@ -246,7 +248,7 @@ def list_all_clusters(namespace: str, print_to_console: bool = True):
246248 return clusters
247249
248250
249- def list_all_queued (namespace : str , print_to_console : bool = True ):
251+ def list_all_queued (namespace : str , print_to_console : bool = True ): # pragma: no cover
250252 """
251253 Returns (and prints by default) a list of all currently queued-up AppWrappers
252254 in a given namespace.
@@ -262,14 +264,18 @@ def list_all_queued(namespace: str, print_to_console: bool = True):
262264# private methods
263265
264266
265- def _app_wrapper_status (name , namespace = "default" ) -> Optional [AppWrapper ]:
267+ def _app_wrapper_status (
268+ name , namespace = "default"
269+ ) -> Optional [AppWrapper ]: # pragma: no cover
266270 with oc .project (namespace ), oc .timeout (10 * 60 ):
267271 cluster = oc .selector (f"appwrapper/{ name } " ).object ()
268272 if cluster :
269273 return _map_to_app_wrapper (cluster )
270274
271275
272- def _ray_cluster_status (name , namespace = "default" ) -> Optional [RayCluster ]:
276+ def _ray_cluster_status (
277+ name , namespace = "default"
278+ ) -> Optional [RayCluster ]: # pragma: no cover
273279 # FIXME should we check the appwrapper first
274280 cluster = None
275281 try :
@@ -283,7 +289,7 @@ def _ray_cluster_status(name, namespace="default") -> Optional[RayCluster]:
283289 return cluster
284290
285291
286- def _get_ray_clusters (namespace = "default" ) -> List [RayCluster ]:
292+ def _get_ray_clusters (namespace = "default" ) -> List [RayCluster ]: # pragma: no cover
287293 list_of_clusters = []
288294
289295 with oc .project (namespace ), oc .timeout (10 * 60 ):
@@ -296,7 +302,7 @@ def _get_ray_clusters(namespace="default") -> List[RayCluster]:
296302
297303def _get_app_wrappers (
298304 namespace = "default" , filter = List [AppWrapperStatus ]
299- ) -> List [AppWrapper ]:
305+ ) -> List [AppWrapper ]: # pragma: no cover
300306 list_of_app_wrappers = []
301307
302308 with oc .project (namespace ), oc .timeout (10 * 60 ):
@@ -311,7 +317,7 @@ def _get_app_wrappers(
311317 return list_of_app_wrappers
312318
313319
314- def _map_to_ray_cluster (cluster ) -> RayCluster :
320+ def _map_to_ray_cluster (cluster ) -> RayCluster : # pragma: no cover
315321 cluster_model = cluster .model
316322
317323 with oc .project (cluster .namespace ()), oc .timeout (10 * 60 ):
@@ -342,7 +348,7 @@ def _map_to_ray_cluster(cluster) -> RayCluster:
342348 )
343349
344350
345- def _map_to_app_wrapper (cluster ) -> AppWrapper :
351+ def _map_to_app_wrapper (cluster ) -> AppWrapper : # pragma: no cover
346352 cluster_model = cluster .model
347353 return AppWrapper (
348354 name = cluster .name (),
0 commit comments