Skip to content

Commit c18d15d

Browse files
Properly rename
1 parent 49ed752 commit c18d15d

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

tidy3d/web/api/container.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ def _check_path_dir(path: str) -> None:
4646
"""Make sure local output directory exists and create it if not."""
4747

4848
@staticmethod
49-
def _check_folder(folder_name: str) -> None:
49+
def _check_folder(folder_name: str, project_endpoint: str = "tidy3d/projects") -> None:
5050
"""Make sure ``folder_name`` exists on the web UI and create it if not."""
51-
Folder.get(folder_name, create=True)
51+
Folder.get(folder_name, create=True, project_endpoint=project_endpoint)
5252

5353

5454
class Job(WebContainer):
@@ -1070,8 +1070,3 @@ def _check_path_dir(path_dir: str) -> None:
10701070
"""
10711071
if len(path_dir) > 0 and not os.path.exists(path_dir):
10721072
os.makedirs(path_dir, exist_ok=True)
1073-
1074-
@staticmethod
1075-
def _check_folder(folder_name: str, endpoint_type: BatchSimulationType) -> None:
1076-
"""Make sure ``folder_name`` exists on the web UI and create it if not."""
1077-
Folder.get(folder_name, create=True)

tidy3d/web/core/task_core.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Folder(Tidy3DResource, Queryable, extra=Extra.allow):
3737
)
3838

3939
@classmethod
40-
def list(cls, project_endpoint: str = "tidy3d/project") -> []:
40+
def list(cls, project_endpoint: str = "tidy3d/projects") -> []:
4141
"""List all folders.
4242
4343
Returns
@@ -56,7 +56,7 @@ def list(cls, project_endpoint: str = "tidy3d/project") -> []:
5656
)
5757

5858
@classmethod
59-
def get(cls, folder_name: str, create: bool = False, project_endpoint: str = "tidy3d/project"):
59+
def get(cls, folder_name: str, create: bool = False, project_endpoint: str = "tidy3d/projects"):
6060
"""Get folder by name.
6161
6262
Parameters
@@ -97,7 +97,7 @@ def create(cls, folder_name: str):
9797
"""
9898
return Folder.get(folder_name, True)
9999

100-
def delete(self, project_endpoint: str = "tidy3d/project"):
100+
def delete(self, project_endpoint: str = "tidy3d/projects"):
101101
"""Remove this folder."""
102102

103103
http.delete(f"{project_endpoint}/{self.folder_id}")
@@ -110,7 +110,7 @@ def delete_old(self, days_old: int) -> int:
110110
params={"daysOld": days_old},
111111
)
112112

113-
def list_tasks(self, project_endpoint: str = "tidy3d/project") -> list[Tidy3DResource]:
113+
def list_tasks(self, project_endpoint: str = "tidy3d/projects") -> list[Tidy3DResource]:
114114
"""List all tasks in this folder.
115115
116116
Returns
@@ -209,7 +209,7 @@ def create(
209209
simulation_type: str = "tidy3d",
210210
parent_tasks: Optional[list[str]] = None,
211211
file_type: str = "Gz",
212-
project_endpoint: str = "tidy3d/project",
212+
project_endpoint: str = "tidy3d/projects",
213213
) -> SimulationTask:
214214
"""Create a new task on the server.
215215

0 commit comments

Comments
 (0)