Skip to content

Commit

Permalink
Merge pull request #1535 from Sage-Bionetworks/schematic-126-file-ann…
Browse files Browse the repository at this point in the history
…otation-storage-update

[SCHEMATIC-126] Update file annotation store process to require filename be present i…
  • Loading branch information
thomasyu888 authored Nov 13, 2024
2 parents e30e32c + 3064d00 commit 4f82822
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion schematic/store/synapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2250,7 +2250,10 @@ async def add_annotations_to_entities_files(
manifest_synapse_table_id="",
annotation_keys: str = "class_label",
):
"""Depending on upload type add Ids to entityId row. Add anotations to connected files.
"""
Depending on upload type add Ids to entityId row. Add anotations to connected
files and folders. Despite the name of this function, it also applies to folders.
Args:
dmge: DataModelGraphExplorer Object
manifest (pd.DataFrame): loaded df containing user supplied data.
Expand Down Expand Up @@ -2295,6 +2298,9 @@ async def add_annotations_to_entities_files(
row["entityId"] = manifest_synapse_table_id
manifest.loc[idx, "entityId"] = manifest_synapse_table_id
entityId = ""
# If the row is the manifest table, do not add annotations
elif row["entityId"] == manifest_synapse_table_id:
entityId = ""
else:
# get the file id of the file to annotate, collected in above step.
entityId = row["entityId"]
Expand Down

0 comments on commit 4f82822

Please sign in to comment.