-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1096 from rjmello/versioned-compute-clients
Create versioned Compute clients
- Loading branch information
Showing
17 changed files
with
114 additions
and
25 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
changelog.d/20241031_151930_30907815+rjmello_versioned_compute_clients.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Added | ||
~~~~~ | ||
|
||
- Created ``ComputeClientV2`` and ``ComputeClientV3`` classes to support Globus Compute | ||
API versions 2 and 3, respectively. The canonical ``ComputeClient`` is now a subclass | ||
of ``ComputeClientV2``, preserving backward compatibility. (:pr:`NUMBER`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
2 changes: 1 addition & 1 deletion
2
.../_testing/data/compute/delete_function.py → ...esting/data/compute/v2/delete_function.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...sdk/_testing/data/compute/get_function.py → .../_testing/data/compute/v2/get_function.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...testing/data/compute/register_function.py → ...ting/data/compute/v2/register_function.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
from .client import ComputeClient | ||
from .client import ComputeClient, ComputeClientV2, ComputeClientV3 | ||
from .data import ComputeFunctionDocument, ComputeFunctionMetadata | ||
from .errors import ComputeAPIError | ||
|
||
__all__ = ( | ||
"ComputeAPIError", | ||
"ComputeClient", | ||
"ComputeClientV2", | ||
"ComputeClientV3", | ||
"ComputeFunctionDocument", | ||
"ComputeFunctionMetadata", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import globus_sdk | ||
from globus_sdk._testing import load_response | ||
|
||
|
||
def test_delete_function(compute_client_v2: globus_sdk.ComputeClientV2): | ||
meta = load_response(compute_client_v2.delete_function).metadata | ||
res = compute_client_v2.delete_function(function_id=meta["function_id"]) | ||
assert res.http_status == 200 | ||
assert res.data == {"result": 302} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from globus_sdk.services.compute.client import ComputeClient, ComputeClientV2 | ||
|
||
|
||
def test_canonical_client_is_v2(): | ||
client = ComputeClient() | ||
assert isinstance(client, ComputeClientV2) |