Skip to content

Commit

Permalink
fix: assign columns instead of modifying input slide manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
raylim committed Nov 2, 2023
1 parent ba01836 commit af76b7a
Show file tree
Hide file tree
Showing 8 changed files with 212 additions and 168 deletions.
7 changes: 3 additions & 4 deletions src/luna/pathology/cli/dsa_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def upload_annotation_to_dsa(
Returns:
DataFrame[SlideSchema]: slide manifest
"""
uuids = []
for slide in slide_manifest.itertuples(name="Slide"):
uuids = _upload_annotation_to_dsa(
dsa_endpoint_url,
Expand All @@ -148,10 +149,8 @@ def upload_annotation_to_dsa(
insecure,
storage_options,
)
slide_manifest.at[
slide.Index, annotation_column.replace("url", "uuid")
] = uuids[0]
return slide_manifest
uuids.append(uuids[0])
return slide_manifest.assign(**{annotation_column: uuids})


def _upload_annotation_to_dsa(
Expand Down
Loading

0 comments on commit af76b7a

Please sign in to comment.