Skip to content

Commit 90ef82a

Browse files
committed
fix callback_url
1 parent c600f66 commit 90ef82a

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
### Fixed
1313
- More helpful error messages from HTTP responses.
1414
- Bug in `_validate_no_structures_pml`, which was using wrong pml thicknesses.
15+
- Broken `callback_url` in webapi.
1516

1617
## [2.1.0] - 2023-4-18
1718

tests/test_web/test_tidy3d_task.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def test_create(set_api_key):
141141
responses.add(
142142
responses.POST,
143143
f"{Env.current.web_api_endpoint}/tidy3d/projects/1234/tasks",
144-
match=[matchers.json_params_matcher({"taskName": "test task", "call_back_url": None})],
144+
match=[matchers.json_params_matcher({"taskName": "test task", "callbackUrl": None})],
145145
json={
146146
"data": {
147147
"taskId": "1234",
@@ -167,7 +167,7 @@ def test_submit(set_api_key):
167167
responses.add(
168168
responses.POST,
169169
f"{Env.current.web_api_endpoint}/tidy3d/projects/1234/tasks",
170-
match=[matchers.json_params_matcher({"taskName": "test task", "call_back_url": None})],
170+
match=[matchers.json_params_matcher({"taskName": "test task", "callbackUrl": None})],
171171
json={
172172
"data": {
173173
"taskId": "1234",

tests/test_web/test_webapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def mock_upload(monkeypatch, set_api_key):
5555
responses.add(
5656
responses.POST,
5757
f"{Env.current.web_api_endpoint}/tidy3d/projects/{TASK_ID}/tasks",
58-
match=[matchers.json_params_matcher({"taskName": TASK_NAME, "call_back_url": None})],
58+
match=[matchers.json_params_matcher({"taskName": TASK_NAME, "callbackUrl": None})],
5959
json={
6060
"data": {
6161
"taskId": TASK_ID,

tidy3d/web/simulation_task.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def _error_if_jax_sim(cls, values):
171171
# pylint: disable=arguments-differ
172172
@classmethod
173173
def create(
174-
cls, simulation: Simulation, task_name: str, folder_name="default", call_back_url=None
174+
cls, simulation: Simulation, task_name: str, folder_name="default", callback_url=None
175175
) -> SimulationTask:
176176
"""Create a new task on the server.
177177
@@ -185,7 +185,7 @@ def create(
185185
The name of the task.
186186
folder_name: str,
187187
The name of the folder to store the task. Default is "default".
188-
call_back_url: str
188+
callback_url: str
189189
Http PUT url to receive simulation finish event. The body content is a json file with
190190
fields ``{'id', 'status', 'name', 'workUnit', 'solverVersion'}``.
191191
@@ -204,7 +204,7 @@ def create(
204204

205205
resp = http.post(
206206
f"tidy3d/projects/{folder.folder_id}/tasks",
207-
{"taskName": task_name, "call_back_url": call_back_url},
207+
{"taskName": task_name, "callbackUrl": callback_url},
208208
)
209209

210210
return SimulationTask(**resp, simulation=simulation, folder=folder)

0 commit comments

Comments
 (0)