Skip to content

Commit 31b7a83

Browse files
Cleanup usage of rf endpoint
1 parent 2b4e107 commit 31b7a83

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

tidy3d/web/api/container.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
DEFAULT_DATA_DIR = "."
3333
BATCH_MONITOR_PROGRESS_REFRESH_TIME = 0.02
3434

35-
BatchSimulationType = Literal["tidy3d", "microwave", "tidy3d_design"]
35+
BatchType = Literal["tidy3d", "microwave", "tidy3d_design"]
3636

3737

3838
class WebContainer(Tidy3dBaseModel, ABC):
@@ -169,7 +169,7 @@ class Job(WebContainer):
169169
True, title="Verbose", description="Whether to print info messages and progressbars."
170170
)
171171

172-
simulation_type: BatchSimulationType = pd.Field(
172+
simulation_type: BatchType = pd.Field(
173173
"tidy3d",
174174
title="Simulation Type",
175175
description="Type of simulation, used internally only.",
@@ -251,10 +251,7 @@ def task_id(self) -> TaskId:
251251
"""The task ID for this ``Job``. Uploads the ``Job`` if it hasn't already been uploaded."""
252252
if self.task_id_cached:
253253
return self.task_id_cached
254-
if self.simulation_type == "microwave":
255-
self._check_folder(self.folder_name, projects_endpoint="tidy3d/projects/rf")
256-
else:
257-
self._check_folder(self.folder_name)
254+
self._check_folder(self.folder_name)
258255
return self._upload()
259256

260257
def _upload(self) -> TaskId:
@@ -541,7 +538,7 @@ class Batch(WebContainer):
541538
"``{'id', 'status', 'name', 'workUnit', 'solverVersion'}``.",
542539
)
543540

544-
simulation_type: BatchSimulationType = pd.Field(
541+
simulation_type: BatchType = pd.Field(
545542
"tidy3d",
546543
title="Simulation Type",
547544
description="Type of each simulation in the batch, used internally only.",
@@ -683,14 +680,7 @@ def num_jobs(self) -> int:
683680

684681
def upload(self) -> None:
685682
"""Upload a series of tasks associated with this ``Batch`` using multi-threading."""
686-
if self.simulation_type == "microwave":
687-
self._check_folder(
688-
self.folder_name,
689-
projects_endpoint="tidy3d/projects/rf",
690-
project_endpoint="tidy3d/project", # TODO update
691-
)
692-
else:
693-
self._check_folder(self.folder_name)
683+
self._check_folder(self.folder_name)
694684
with ThreadPoolExecutor(max_workers=self.num_workers) as executor:
695685
futures = [executor.submit(job.upload) for _, job in self.jobs.items()]
696686

0 commit comments

Comments
 (0)