Skip to content

Commit

Permalink
πŸ’š Fixes (#1782)
Browse files Browse the repository at this point in the history
Co-authored-by: Sunny Sun <[email protected]>
  • Loading branch information
falexwolf and sunnyosun authored Aug 2, 2024
1 parent 5dd0d2e commit 8e5a957
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
14 changes: 11 additions & 3 deletions lamindb/_parents.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,17 @@ def _view_parents(

df_edges = None
df_edges_parents = _df_edges_from_parents(
record=record, field=field, distance=distance
record=record, field=field, distance=distance, attr_name=attr_name
)
if df_edges_parents is not None:
df_edges = df_edges_parents
if with_children:
df_edges_children = _df_edges_from_parents(
record=record, field=field, distance=distance, children=True
record=record,
field=field,
distance=distance,
children=True,
attr_name=attr_name,
)
if df_edges_children is not None:
if df_edges is not None:
Expand Down Expand Up @@ -250,7 +254,11 @@ def _df_edges_from_parents(
else:
key = "successors" if children else "predecessors"
parents = _get_parents(
record=record, field=field, distance=distance, children=children
record=record,
field=field,
distance=distance,
children=children,
attr_name=attr_name,
)
all = record.__class__.objects
records = parents | all.filter(id=record.id)
Expand Down
2 changes: 1 addition & 1 deletion lamindb/_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def latest_run(self) -> Run:
def view_lineage(self, with_successors: bool = False, distance: int = 5):
return _view_parents(
record=self,
field=None,
field="name",
with_children=with_successors,
distance=distance,
attr_name="predecessors",
Expand Down
2 changes: 2 additions & 0 deletions lamindb/core/_label_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def get_labels_as_dict(self: HasFeatures, links: bool = False):
"links_feature_set",
"previous_runs",
"_feature_values",
"_lnschema_core_collection__actions_+",
"_actions",
}
labels = {} # type: ignore
if self.id is None:
Expand Down
2 changes: 1 addition & 1 deletion sub/bionty
Submodule bionty updated 2 files
+5 βˆ’5 bionty/_bionty.py
+1 βˆ’0 docs/changelog.md

0 comments on commit 8e5a957

Please sign in to comment.