graphty 0.3.0__tar.gz → 0.4.0__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.
- {graphty-0.3.0 → graphty-0.4.0}/PKG-INFO +1 -1
- {graphty-0.3.0 → graphty-0.4.0}/pyproject.toml +1 -1
- graphty-0.4.0/src/graphty/.ruff_cache/0.15.17/18262235589301934996 +0 -0
- graphty-0.4.0/src/graphty/.ruff_cache/0.15.17/8059422986951603277 +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/materializer.py +1 -1
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/planner.py +13 -8
- graphty-0.4.0/src/graphty/utils/.ruff_cache/0.15.17/3781096723789676511 +0 -0
- graphty-0.4.0/src/graphty/utils/.ruff_cache/0.15.17/6602623227124377539 +0 -0
- graphty-0.3.0/src/graphty/.ruff_cache/0.15.17/18262235589301934996 +0 -0
- graphty-0.3.0/src/graphty/.ruff_cache/0.15.17/8059422986951603277 +0 -0
- graphty-0.3.0/src/graphty/utils/.ruff_cache/0.15.17/3781096723789676511 +0 -0
- graphty-0.3.0/src/graphty/utils/.ruff_cache/0.15.17/6602623227124377539 +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/README.md +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/.ruff_cache/.gitignore +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/.ruff_cache/0.14.6/1516144176499143322 +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/.ruff_cache/0.14.6/16552783075482950175 +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/.ruff_cache/0.6.9/5647188018562798146 +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/.ruff_cache/0.6.9/9121026693023336299 +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/.ruff_cache/CACHEDIR.TAG +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/__init__.py +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/py.typed +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/utils/.ruff_cache/.gitignore +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/utils/.ruff_cache/0.14.6/15861910901900155226 +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/utils/.ruff_cache/0.14.6/7883837630368280160 +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/utils/.ruff_cache/CACHEDIR.TAG +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/utils/alias_map.py +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/utils/exceptions.py +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/utils/structlog.py +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/utils/type_utils.py +0 -0
- {graphty-0.3.0 → graphty-0.4.0}/src/graphty/utils/types.py +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -21,7 +21,7 @@ class ModelMaterializer[TModel: BaseModel]:
|
|
|
21
21
|
@cached_property
|
|
22
22
|
def df(self) -> pl.DataFrame:
|
|
23
23
|
lazy_frame: pl.LazyFrame = self._planner.run()
|
|
24
|
-
return lazy_frame.collect()
|
|
24
|
+
return lazy_frame.collect(engine="streaming")
|
|
25
25
|
|
|
26
26
|
def generate_bindings(self) -> Iterator[dict[str, object]]:
|
|
27
27
|
return self.df.iter_rows(named=True)
|
|
@@ -33,12 +33,12 @@ def get_model_projection(model: type[BaseModel], base_cols: set[str]) -> set[str
|
|
|
33
33
|
|
|
34
34
|
def build_model_struct(model: type[BaseModel], base_cols: set[str]) -> pl.Struct:
|
|
35
35
|
model_projection: set[str] = get_model_projection(model=model, base_cols=base_cols)
|
|
36
|
-
exprs:
|
|
37
|
-
[pl.col(member) for member in model_projection],
|
|
38
|
-
Exprs(model=model, base_cols=base_cols),
|
|
39
|
-
|
|
36
|
+
exprs: list[pl.Expr] = [
|
|
37
|
+
*[pl.col(member) for member in model_projection],
|
|
38
|
+
*Exprs(model=model, base_cols=base_cols),
|
|
39
|
+
]
|
|
40
40
|
|
|
41
|
-
return pl.struct(
|
|
41
|
+
return pl.struct(exprs or base_cols)
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
@overload
|
|
@@ -310,9 +310,14 @@ class LazyFramePlanner:
|
|
|
310
310
|
)
|
|
311
311
|
|
|
312
312
|
if group_by is None:
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
313
|
+
if self.model.model_fields:
|
|
314
|
+
# TODO: when Opacity/planner disengagement is implemented, fields marked
|
|
315
|
+
# as Opaque should not count as "model fields" for this check — a model
|
|
316
|
+
# with only Opaque fields should also return the raw frame.
|
|
317
|
+
return self.lazy_frame.with_columns(
|
|
318
|
+
*Exprs(model=self.model, base_cols=self._base_cols)
|
|
319
|
+
).drop(self._base_cols.difference(model_projection))
|
|
320
|
+
return self.lazy_frame
|
|
316
321
|
|
|
317
322
|
return self.lazy_frame.group_by(group_by, maintain_order=True).agg(
|
|
318
323
|
*[pl.col(col).first() for col in model_projection.difference({group_by})],
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|