ygg 0.1.25__tar.gz → 0.1.26__tar.gz

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 (61) hide show
  1. {ygg-0.1.25 → ygg-0.1.26}/PKG-INFO +1 -1
  2. {ygg-0.1.25 → ygg-0.1.26}/pyproject.toml +1 -1
  3. {ygg-0.1.25 → ygg-0.1.26}/src/ygg.egg-info/PKG-INFO +1 -1
  4. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/databricks/sql/engine.py +1 -2
  5. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/databricks/workspaces/databricks_path.py +40 -20
  6. {ygg-0.1.25 → ygg-0.1.26}/LICENSE +0 -0
  7. {ygg-0.1.25 → ygg-0.1.26}/README.md +0 -0
  8. {ygg-0.1.25 → ygg-0.1.26}/setup.cfg +0 -0
  9. {ygg-0.1.25 → ygg-0.1.26}/src/ygg.egg-info/SOURCES.txt +0 -0
  10. {ygg-0.1.25 → ygg-0.1.26}/src/ygg.egg-info/dependency_links.txt +0 -0
  11. {ygg-0.1.25 → ygg-0.1.26}/src/ygg.egg-info/entry_points.txt +0 -0
  12. {ygg-0.1.25 → ygg-0.1.26}/src/ygg.egg-info/requires.txt +0 -0
  13. {ygg-0.1.25 → ygg-0.1.26}/src/ygg.egg-info/top_level.txt +0 -0
  14. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/__init__.py +0 -0
  15. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/databricks/__init__.py +0 -0
  16. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/databricks/compute/__init__.py +0 -0
  17. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/databricks/compute/cluster.py +0 -0
  18. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/databricks/compute/execution_context.py +0 -0
  19. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/databricks/compute/remote.py +0 -0
  20. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/databricks/jobs/__init__.py +0 -0
  21. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/databricks/jobs/config.py +0 -0
  22. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/databricks/sql/__init__.py +0 -0
  23. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/databricks/sql/exceptions.py +0 -0
  24. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/databricks/sql/statement_result.py +0 -0
  25. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/databricks/sql/types.py +0 -0
  26. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/databricks/workspaces/__init__.py +0 -0
  27. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/databricks/workspaces/workspace.py +0 -0
  28. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/dataclasses/__init__.py +0 -0
  29. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/dataclasses/dataclass.py +0 -0
  30. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/libs/__init__.py +0 -0
  31. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/libs/databrickslib.py +0 -0
  32. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/libs/extensions/__init__.py +0 -0
  33. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/libs/extensions/polars_extensions.py +0 -0
  34. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/libs/extensions/spark_extensions.py +0 -0
  35. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/libs/pandaslib.py +0 -0
  36. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/libs/polarslib.py +0 -0
  37. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/libs/sparklib.py +0 -0
  38. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/pyutils/__init__.py +0 -0
  39. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/pyutils/callable_serde.py +0 -0
  40. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/pyutils/exceptions.py +0 -0
  41. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/pyutils/modules.py +0 -0
  42. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/pyutils/parallel.py +0 -0
  43. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/pyutils/python_env.py +0 -0
  44. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/pyutils/retry.py +0 -0
  45. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/requests/__init__.py +0 -0
  46. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/requests/msal.py +0 -0
  47. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/requests/session.py +0 -0
  48. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/types/__init__.py +0 -0
  49. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/types/cast/__init__.py +0 -0
  50. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/types/cast/arrow_cast.py +0 -0
  51. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/types/cast/cast_options.py +0 -0
  52. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/types/cast/pandas_cast.py +0 -0
  53. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/types/cast/polars_cast.py +0 -0
  54. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/types/cast/polars_pandas_cast.py +0 -0
  55. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/types/cast/registry.py +0 -0
  56. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/types/cast/spark_cast.py +0 -0
  57. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/types/cast/spark_pandas_cast.py +0 -0
  58. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/types/cast/spark_polars_cast.py +0 -0
  59. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/types/libs.py +0 -0
  60. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/types/python_arrow.py +0 -0
  61. {ygg-0.1.25 → ygg-0.1.26}/src/yggdrasil/types/python_defaults.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ygg
3
- Version: 0.1.25
3
+ Version: 0.1.26
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ygg"
7
- version = "0.1.25"
7
+ version = "0.1.26"
8
8
  description = "Type-friendly utilities for moving data between Python objects, Arrow, Polars, Pandas, Spark, and Databricks"
9
9
  readme = { file = "README.md", content-type = "text/markdown" }
10
10
  license = { file = "LICENSE" }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ygg
3
- Version: 0.1.25
3
+ Version: 0.1.26
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
@@ -439,8 +439,7 @@ FROM parquet.`{databricks_tmp_folder}`"""
439
439
  try:
440
440
  databricks_tmp_folder.rmdir(recursive=True)
441
441
  except Exception as e:
442
- raise e
443
- logger.error(e)
442
+ logger.warning(e)
444
443
 
445
444
  # Optionally run OPTIMIZE / ZORDER / VACUUM if requested (Databricks SQL)
446
445
  if zorder_by:
@@ -115,10 +115,11 @@ class DatabricksPath(SysPath, PurePosixPath):
115
115
  """
116
116
  if isinstance(template, DatabricksPath):
117
117
  # Recompute kind for the NEW path string (don’t blindly copy _kind)
118
- kind, ws, _ = DatabricksPathKind.parse(str(self), workspace=getattr(template, "_workspace", None))
118
+ temp_ws = getattr(template, "_workspace", None)
119
+ kind, ws, _ = DatabricksPathKind.parse(str(self), workspace=temp_ws)
119
120
 
120
121
  self._kind = kind
121
- self._workspace = ws if ws is not None else getattr(template, "_workspace", None)
122
+ self._workspace = ws if ws is not None else temp_ws
122
123
 
123
124
  # Never inherit caches from template
124
125
  self._is_file = None
@@ -171,6 +172,22 @@ class DatabricksPath(SysPath, PurePosixPath):
171
172
  # pathlib paths are effectively immutable; all init happens in __new__ / _init
172
173
  pass
173
174
 
175
+ def __truediv__(self, other):
176
+ if not other:
177
+ return self
178
+
179
+ built = super().__truediv__(other)
180
+
181
+ built._kind = self._kind
182
+ built._workspace = self._workspace
183
+
184
+ built._is_file = None
185
+ built._is_dir = None
186
+ built._raw_status = None
187
+ built._raw_status_refresh_time = 0.0
188
+
189
+ return built
190
+
174
191
  def __enter__(self):
175
192
  self.workspace.__enter__()
176
193
  return self
@@ -178,32 +195,34 @@ class DatabricksPath(SysPath, PurePosixPath):
178
195
  def __exit__(self, exc_type, exc_val, exc_tb):
179
196
  return self.workspace.__exit__(exc_type, exc_val, exc_tb)
180
197
 
181
- @property
182
- def workspace(self):
183
- try:
184
- if self._workspace is None:
185
- from .workspace import Workspace
198
+ def _from_parsed_parts(self, drv, root, parts):
199
+ built = super()._from_parsed_parts(drv, root, parts)
186
200
 
187
- self._workspace = Workspace()
188
- except AttributeError:
189
- self._init(template=self)
201
+ built._kind = self._kind
202
+ built._workspace = self._workspace
190
203
 
191
- from .workspace import Workspace
204
+ built._is_file = None
205
+ built._is_dir = None
206
+ built._raw_status = None
207
+ built._raw_status_refresh_time = 0.0
192
208
 
193
- if self._workspace is None:
194
- from .workspace import Workspace
209
+ return built
195
210
 
196
- self._workspace = Workspace()
211
+ @property
212
+ def workspace(self):
213
+ if self._workspace is None:
214
+ from .workspace import Workspace
197
215
 
216
+ self._workspace = Workspace()
198
217
  return self._workspace
199
218
 
219
+ @workspace.setter
220
+ def workspace(self, value):
221
+ self._workspace = value
222
+
200
223
  @property
201
224
  def kind(self):
202
- try:
203
- return self._kind
204
- except AttributeError:
205
- self._init(template=self)
206
- return self._kind
225
+ return self._kind
207
226
 
208
227
  @kind.setter
209
228
  def kind(self, value: DatabricksPathKind):
@@ -606,7 +625,8 @@ class DatabricksPath(SysPath, PurePosixPath):
606
625
 
607
626
  try:
608
627
  # FIX: DBFS listing should use DBFS-normalized path, not workspace path
609
- for info in sdk.dbfs.list(self.as_dbfs_api_path(), recursive=recursive):
628
+ p = "/dbfs/" + self.as_dbfs_api_path() + "/"
629
+ for info in sdk.dbfs.list(p, recursive=recursive):
610
630
  base = DatabricksPath(
611
631
  info.path,
612
632
  workspace=self.workspace,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes