Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💚 Fixes #1782

Merged
merged 8 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading