ygg 0.1.43__py3-none-any.whl → 0.1.44__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ygg
3
- Version: 0.1.43
3
+ Version: 0.1.44
4
4
  Summary: Type-friendly utilities for moving data between Python objects, Arrow, Polars, Pandas, Spark, and Databricks
5
5
  Author: Yggdrasil contributors
6
6
  License: Apache License
@@ -1,9 +1,9 @@
1
- ygg-0.1.43.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
1
+ ygg-0.1.44.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
2
2
  yggdrasil/__init__.py,sha256=PfH7Xwt6uue6oqe6S5V8NhDJcVQClkKrBE1KXhdelZc,117
3
- yggdrasil/version.py,sha256=UoVHMD6MTDcIuCiAGXBFICsOFwtnni_KEOLxLK-bMlk,22
3
+ yggdrasil/version.py,sha256=DRHimXBBU-nUJWLj3HfOg9_glzt2k0luj068qgL5e5E,22
4
4
  yggdrasil/databricks/__init__.py,sha256=skctY2c8W-hI81upx9F_PWRe5ishL3hrdiTuizgDjdw,152
5
5
  yggdrasil/databricks/compute/__init__.py,sha256=NvdzmaJSNYY1uJthv1hHdBuNu3bD_-Z65DWnaJt9yXg,289
6
- yggdrasil/databricks/compute/cluster.py,sha256=RLXEKgGAeIOPH6lzX3J8brBoqDu_RsjiZam-yymiabM,40933
6
+ yggdrasil/databricks/compute/cluster.py,sha256=I2Iy0WInwNifL72jZCPg2WgpfbNQjXV4bF0emRT732g,41137
7
7
  yggdrasil/databricks/compute/execution_context.py,sha256=E86b-VF9hZ4WbqHt43ATR-YYvgPZ91_17DQ5oaQFNgg,22688
8
8
  yggdrasil/databricks/compute/remote.py,sha256=nEN_Fr1Ouul_iKOf4B5QjEGscYAcl7nHjGsl2toRzrU,2874
9
9
  yggdrasil/databricks/jobs/__init__.py,sha256=snxGSJb0M5I39v0y3IR-uEeSlZR248cQ_4DJ1sYs-h8,154
@@ -55,8 +55,8 @@ yggdrasil/types/cast/registry.py,sha256=_zdFGmUBB7P-e_LIcJlOxMcxAkXoA-UXB6HqLMgT
55
55
  yggdrasil/types/cast/spark_cast.py,sha256=_KAsl1DqmKMSfWxqhVE7gosjYdgiL1C5bDQv6eP3HtA,24926
56
56
  yggdrasil/types/cast/spark_pandas_cast.py,sha256=BuTiWrdCANZCdD_p2MAytqm74eq-rdRXd-LGojBRrfU,5023
57
57
  yggdrasil/types/cast/spark_polars_cast.py,sha256=btmZNHXn2NSt3fUuB4xg7coaE0RezIBdZD92H8NK0Jw,9073
58
- ygg-0.1.43.dist-info/METADATA,sha256=UWEaa2zwto1jGhoHMzROMgAsrXlPddS5qQkBHCAZjoI,19204
59
- ygg-0.1.43.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
60
- ygg-0.1.43.dist-info/entry_points.txt,sha256=6q-vpWG3kvw2dhctQ0LALdatoeefkN855Ev02I1dKGY,70
61
- ygg-0.1.43.dist-info/top_level.txt,sha256=iBe9Kk4VIVbLpgv_p8OZUIfxgj4dgJ5wBg6vO3rigso,10
62
- ygg-0.1.43.dist-info/RECORD,,
58
+ ygg-0.1.44.dist-info/METADATA,sha256=_5XOQ56SkOMJb6dcbRc7CyOlp6jewJPNZdDi05_9Ck8,19204
59
+ ygg-0.1.44.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
60
+ ygg-0.1.44.dist-info/entry_points.txt,sha256=6q-vpWG3kvw2dhctQ0LALdatoeefkN855Ev02I1dKGY,70
61
+ ygg-0.1.44.dist-info/top_level.txt,sha256=iBe9Kk4VIVbLpgv_p8OZUIfxgj4dgJ5wBg6vO3rigso,10
62
+ ygg-0.1.44.dist-info/RECORD,,
@@ -658,12 +658,14 @@ class Cluster(WorkspaceService):
658
658
  def update(
659
659
  self,
660
660
  libraries: Optional[List[Union[str, "Library"]]] = None,
661
+ wait_timeout: Union[float, dt.timedelta] = dt.timedelta(minutes=20),
661
662
  **cluster_spec: Any
662
663
  ) -> "Cluster":
663
664
  """Update cluster configuration and optionally install libraries.
664
665
 
665
666
  Args:
666
667
  libraries: Optional libraries to install.
668
+ wait_timeout: waiting timeout until done, if None it does not wait
667
669
  **cluster_spec: Cluster specification overrides.
668
670
 
669
671
  Returns:
@@ -703,20 +705,16 @@ class Cluster(WorkspaceService):
703
705
  )
704
706
 
705
707
  self.wait_for_status()
706
- try:
707
- self.details = self.clusters_client().edit_and_wait(**update_details)
708
- except Exception as e:
709
- if self.state == State.TERMINATED:
710
- self.start()
711
- self.details = self.clusters_client().edit_and_wait(**update_details)
712
- else:
713
- raise e
708
+ self.clusters_client().edit(**update_details)
714
709
 
715
710
  logger.info(
716
711
  "Updated %s",
717
712
  self
718
713
  )
719
714
 
715
+ if wait_timeout:
716
+ self.wait_for_status(timeout=wait_timeout)
717
+
720
718
  return self
721
719
 
722
720
  def list_clusters(self) -> Iterator["Cluster"]:
@@ -1027,6 +1025,17 @@ class Cluster(WorkspaceService):
1027
1025
  for _ in libraries if _
1028
1026
  ]
1029
1027
 
1028
+ if libraries:
1029
+ existing = [
1030
+ _.library for _ in self.installed_library_statuses()
1031
+ ]
1032
+
1033
+ libraries = [
1034
+ _
1035
+ for _ in libraries
1036
+ if _ not in existing
1037
+ ]
1038
+
1030
1039
  if libraries:
1031
1040
  wsdk.libraries.install(
1032
1041
  cluster_id=self.cluster_id,
yggdrasil/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.43"
1
+ __version__ = "0.1.44"
File without changes