Skip to content

Commit

Permalink
Added deprecation TODO comments to bulk async skeleton GET endpoints.
Browse files Browse the repository at this point in the history
  • Loading branch information
kebwi committed Dec 16, 2024
1 parent a171590 commit 00a9301
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions caveclient/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,12 @@
+ "/{datastack_name}/bulk/get_skeletons/{output_format}/{gen_missing_sks}/{root_ids}",
"get_bulk_skeletons_via_skvn_rids": skeleton_v1
+ "/{datastack_name}/bulk/get_skeletons/{skeleton_version}/{output_format}/{gen_missing_sks}/{root_ids}",
# DEPRECATED: This endpoint is deprecated and will be removed in the future.
# Please use the POST endpoint in the future.
"gen_bulk_skeletons_via_rids": skeleton_v1
+ "/{datastack_name}/bulk/gen_skeletons/{root_ids}",
# DEPRECATED: This endpoint is deprecated and will be removed in the future.
# Please use the POST endpoint in the future.
"gen_bulk_skeletons_via_skvn_rids": skeleton_v1
+ "/{datastack_name}/bulk/gen_skeletons/{skeleton_version}/{root_ids}",
"gen_bulk_skeletons_via_rids_as_post": skeleton_v1
Expand Down
4 changes: 3 additions & 1 deletion caveclient/skeletonservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ def _build_bulk_async_endpoint(
endpoint_mapping = self.default_url_mapping
endpoint_mapping["datastack_name"] = datastack_name
if not post:

Check warning on line 310 in caveclient/skeletonservice.py

View check run for this annotation

Codecov / codecov/patch

caveclient/skeletonservice.py#L310

Added line #L310 was not covered by tests
# DEPRECATED: This endpoint is deprecated and will be removed in the future.
# Please use the POST endpoint in the future.
endpoint_mapping["root_ids"] = ",".join([str(v) for v in root_ids])

Check warning on line 313 in caveclient/skeletonservice.py

View check run for this annotation

Codecov / codecov/patch

caveclient/skeletonservice.py#L313

Added line #L313 was not covered by tests

if not skeleton_version:
Expand Down Expand Up @@ -703,7 +705,7 @@ def generate_bulk_skeletons_async(
root_ids = root_ids[:MAX_BULK_ASYNCHRONOUS_SKELETONS]

# TODO: I recently converted this function to a batched approach to alleviate sending a long URL of root_ids via GET,
# but has since converted the call to POST, which probably obviates the need for the considerably more complex batch handling.
# but have since converted the call to POST, which probably obviates the need for the considerably more complex batch handling.
# So consider reverting to the unbatched approach in the future.

estimated_async_time_secs_upper_bound_sum = 0
Expand Down

0 comments on commit 00a9301

Please sign in to comment.