Skip to content
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Breaking Changes
----------------

- The ``function_data`` argument to ``ComputeClientV2.register_function`` has
been renamed to ``data`` to be consistent with other usages. (:pr:`NUMBER`)
9 changes: 3 additions & 6 deletions src/globus_sdk/services/compute/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,10 @@ def lock_endpoint(self, endpoint_id: uuid.UUID | str) -> GlobusHTTPResponse:
""" # noqa: E501
return self.post(f"/v2/endpoints/{endpoint_id}/lock")

def register_function(
self,
function_data: dict[str, t.Any],
) -> GlobusHTTPResponse:
def register_function(self, data: dict[str, t.Any]) -> GlobusHTTPResponse:
"""Register a new function.

:param function_data: A function registration document.
:param data: A function registration document.

.. tab-set::

Expand All @@ -165,7 +162,7 @@ def register_function(
:service: compute
:ref: Functions/operation/register_function_v2_functions_post
""" # noqa: E501
return self.post("/v2/functions", data=function_data)
return self.post("/v2/functions", data=data)

def get_function(self, function_id: uuid.UUID | str) -> GlobusHTTPResponse:
"""Get information about a registered function.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ def test_register_function(compute_client_v2: globus_sdk.ComputeClientV2):
"function_name": meta["function_name"],
"function_code": meta["function_code"],
}
res = compute_client_v2.register_function(function_data=registration_doc)
res = compute_client_v2.register_function(data=registration_doc)
assert res.http_status == 200
assert res.data["function_uuid"] == meta["function_id"]
Loading