ygg 0.1.57__py3-none-any.whl → 0.1.64__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.
Files changed (46) hide show
  1. {ygg-0.1.57.dist-info → ygg-0.1.64.dist-info}/METADATA +2 -2
  2. ygg-0.1.64.dist-info/RECORD +74 -0
  3. yggdrasil/ai/__init__.py +2 -0
  4. yggdrasil/ai/session.py +87 -0
  5. yggdrasil/ai/sql_session.py +310 -0
  6. yggdrasil/databricks/__init__.py +0 -3
  7. yggdrasil/databricks/compute/cluster.py +68 -113
  8. yggdrasil/databricks/compute/command_execution.py +674 -0
  9. yggdrasil/databricks/compute/exceptions.py +19 -0
  10. yggdrasil/databricks/compute/execution_context.py +491 -282
  11. yggdrasil/databricks/compute/remote.py +4 -14
  12. yggdrasil/databricks/exceptions.py +10 -0
  13. yggdrasil/databricks/sql/__init__.py +0 -4
  14. yggdrasil/databricks/sql/engine.py +178 -178
  15. yggdrasil/databricks/sql/exceptions.py +9 -1
  16. yggdrasil/databricks/sql/statement_result.py +108 -120
  17. yggdrasil/databricks/sql/warehouse.py +339 -92
  18. yggdrasil/databricks/workspaces/io.py +185 -40
  19. yggdrasil/databricks/workspaces/path.py +114 -100
  20. yggdrasil/databricks/workspaces/workspace.py +210 -61
  21. yggdrasil/exceptions.py +7 -0
  22. yggdrasil/libs/databrickslib.py +22 -18
  23. yggdrasil/libs/extensions/spark_extensions.py +1 -1
  24. yggdrasil/libs/pandaslib.py +15 -6
  25. yggdrasil/libs/polarslib.py +49 -13
  26. yggdrasil/pyutils/__init__.py +1 -2
  27. yggdrasil/pyutils/callable_serde.py +12 -19
  28. yggdrasil/pyutils/exceptions.py +16 -0
  29. yggdrasil/pyutils/modules.py +6 -7
  30. yggdrasil/pyutils/python_env.py +16 -21
  31. yggdrasil/pyutils/waiting_config.py +171 -0
  32. yggdrasil/requests/msal.py +9 -96
  33. yggdrasil/types/cast/arrow_cast.py +3 -0
  34. yggdrasil/types/cast/pandas_cast.py +157 -169
  35. yggdrasil/types/cast/polars_cast.py +11 -43
  36. yggdrasil/types/dummy_class.py +81 -0
  37. yggdrasil/types/file_format.py +6 -2
  38. yggdrasil/types/python_defaults.py +92 -76
  39. yggdrasil/version.py +1 -1
  40. ygg-0.1.57.dist-info/RECORD +0 -66
  41. yggdrasil/databricks/ai/loki.py +0 -53
  42. {ygg-0.1.57.dist-info → ygg-0.1.64.dist-info}/WHEEL +0 -0
  43. {ygg-0.1.57.dist-info → ygg-0.1.64.dist-info}/entry_points.txt +0 -0
  44. {ygg-0.1.57.dist-info → ygg-0.1.64.dist-info}/licenses/LICENSE +0 -0
  45. {ygg-0.1.57.dist-info → ygg-0.1.64.dist-info}/top_level.txt +0 -0
  46. /yggdrasil/{databricks/ai/__init__.py → pyutils/mimetypes.py} +0 -0
@@ -36,11 +36,8 @@ def databricks_remote_compute(
36
36
  cluster_name: Optional[str] = None,
37
37
  workspace: Optional[Union[Workspace, str]] = None,
38
38
  cluster: Optional["Cluster"] = None,
39
- timeout: Optional[dt.timedelta] = None,
40
39
  env_keys: Optional[List[str]] = None,
41
40
  force_local: bool = False,
42
- update_timeout: Optional[Union[float, dt.timedelta]] = None,
43
- **options
44
41
  ) -> Callable[[Callable[..., ReturnType]], Callable[..., ReturnType]]:
45
42
  """Return a decorator that executes functions on a remote cluster.
46
43
 
@@ -50,11 +47,8 @@ def databricks_remote_compute(
50
47
  cluster_name: Optional cluster name to target.
51
48
  workspace: Workspace instance or host string for lookup.
52
49
  cluster: Pre-configured Cluster instance to reuse.
53
- timeout: Optional execution timeout for remote calls.
54
50
  env_keys: Optional environment variable names to forward.
55
51
  force_local: Force local execution
56
- update_timeout: creation or update wait timeout
57
- **options: Extra options forwarded to the execution decorator.
58
52
 
59
53
  Returns:
60
54
  A decorator that runs functions on the resolved Databricks cluster.
@@ -85,14 +79,10 @@ def databricks_remote_compute(
85
79
  workspace=workspace,
86
80
  cluster_name=cluster_name,
87
81
  single_user_name=workspace.current_user.user_name,
88
- update_timeout=update_timeout
82
+ wait_update=False
89
83
  )
90
84
 
91
- cluster.ensure_running(wait_timeout=None)
92
-
93
- return cluster.execution_decorator(
94
- _func=_func,
95
- env_keys=env_keys,
96
- timeout=timeout,
97
- **options
85
+ return cluster.system_context.decorate(
86
+ func=_func,
87
+ environ=env_keys,
98
88
  )
@@ -0,0 +1,10 @@
1
+ from ..exceptions import YGGException
2
+
3
+
4
+ __all__ = [
5
+ "DatabricksException"
6
+ ]
7
+
8
+
9
+ class DatabricksException(YGGException):
10
+ pass
@@ -2,7 +2,3 @@
2
2
 
3
3
  from .engine import SQLEngine, StatementResult
4
4
  from .exceptions import SqlStatementError
5
-
6
- # Backwards compatibility
7
- DBXSQL = SQLEngine
8
- DBXStatementResult = StatementResult