Skip to content

Commit

Permalink
Rename sublattice submission endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
cjao committed May 24, 2024
1 parent 834ab2f commit 93082c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion covalent/_dispatcher_plugins/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def register_manifest(
endpoint = API_ENTRYPOINT

if parent_dispatch_id:
endpoint = f"{API_ENTRYPOINT}/{parent_dispatch_id}/subdispatches"
endpoint = f"{API_ENTRYPOINT}/{parent_dispatch_id}/sublattices"

r = APIClient(dispatcher_addr).post(endpoint, data=stripped.model_dump_json())
r.raise_for_status()
Expand Down
2 changes: 1 addition & 1 deletion covalent_dispatcher/_service/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ async def register(manifest: ResultSchema) -> ResultSchema:
) from e


@router.post("/dispatches/{dispatch_id}/subdispatches", status_code=201)
@router.post("/dispatches/{dispatch_id}/sublattices", status_code=201)
async def register_subdispatch(
manifest: ResultSchema,
dispatch_id: str,
Expand Down
2 changes: 1 addition & 1 deletion tests/covalent_dispatcher_tests/_service/app_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def test_register_sublattice(mocker, app, client, mock_manifest):
)
mocker.patch("covalent_dispatcher._service.app.cancel_all_with_status")
resp = client.post(
"/api/v2/dispatches/parent_dispatch/subdispatches",
"/api/v2/dispatches/parent_dispatch/sublattices",
data=mock_manifest.json(),
)

Expand Down

0 comments on commit 93082c6

Please sign in to comment.