Skip to content

Commit 9716cd0

Browse files
committed
REFACTOR: Handle previous use of destination input
1 parent f667df2 commit 9716cd0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/ansys/aedt/core/examples/downloads.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def _download_folder(
159159
###############################################################################
160160

161161

162+
@pyaedt_function_handler(destination="local_path")
162163
def download_aedb(local_path: Optional[Union[str, Path]] = None) -> str:
163164
"""Download an example of AEDB file and return the def path.
164165
@@ -190,6 +191,7 @@ def download_aedb(local_path: Optional[Union[str, Path]] = None) -> str:
190191
return str(edbdef_path.parent)
191192

192193

194+
@pyaedt_function_handler(destination="local_path")
193195
def download_edb_merge_utility(force_download: bool = False, local_path: Optional[Union[str, Path]] = None) -> str:
194196
"""Download an example of WPF Project which allows to merge 2aedb files.
195197
@@ -233,6 +235,7 @@ def download_edb_merge_utility(force_download: bool = False, local_path: Optiona
233235
return str(script_path)
234236

235237

238+
@pyaedt_function_handler(destination="local_path")
236239
def download_netlist(local_path: Optional[Union[str, Path]] = None) -> str:
237240
"""Download an example of netlist File and return the def path.
238241
@@ -264,6 +267,7 @@ def download_netlist(local_path: Optional[Union[str, Path]] = None) -> str:
264267
return str(cir_file_path)
265268

266269

270+
@pyaedt_function_handler(destination="local_path")
267271
def download_antenna_array(local_path: Optional[Union[str, Path]] = None) -> str:
268272
"""Download an example of Antenna Array and return the def path.
269273
@@ -296,6 +300,7 @@ def download_antenna_array(local_path: Optional[Union[str, Path]] = None) -> str
296300
return str(aedt_file_path)
297301

298302

303+
@pyaedt_function_handler(destination="local_path")
299304
def download_sbr(local_path: Optional[Union[str, Path]] = None) -> str:
300305
"""Download an example of SBR+ Array and return the def path.
301306
@@ -325,6 +330,7 @@ def download_sbr(local_path: Optional[Union[str, Path]] = None) -> str:
325330
return str(aedt_file_path)
326331

327332

333+
@pyaedt_function_handler(destination="local_path")
328334
def download_sbr_time(local_path: Optional[Union[str, Path]] = None) -> str:
329335
"""Download an example of SBR+ Time domain animation and return the def path.
330336
@@ -354,6 +360,7 @@ def download_sbr_time(local_path: Optional[Union[str, Path]] = None) -> str:
354360
return str(aedt_file_path)
355361

356362

363+
@pyaedt_function_handler(destination="local_path")
357364
def download_icepak(local_path: Optional[Union[str, Path]] = None) -> str:
358365
"""Download an example of Icepak Array and return the def path.
359366
@@ -385,6 +392,7 @@ def download_icepak(local_path: Optional[Union[str, Path]] = None) -> str:
385392
return str(aedt_file_path)
386393

387394

395+
@pyaedt_function_handler(destination="local_path")
388396
def download_icepak_3d_component(local_path: Optional[Union[str, Path]] = None) -> str: # pragma: no cover
389397
"""Download an example of Icepak Array and return the def pathsw.
390398
@@ -416,6 +424,7 @@ def download_icepak_3d_component(local_path: Optional[Union[str, Path]] = None)
416424
return str(folder_path / "PCBAssembly.aedt")
417425

418426

427+
@pyaedt_function_handler(destination="local_path")
419428
def download_via_wizard(local_path: Optional[Union[str, Path]] = None) -> str:
420429
"""Download an example of Hfss Via Wizard and return the def path.
421430
@@ -447,6 +456,7 @@ def download_via_wizard(local_path: Optional[Union[str, Path]] = None) -> str:
447456
return str(aedt_file)
448457

449458

459+
@pyaedt_function_handler(destination="local_path")
450460
def download_touchstone(local_path: Optional[Union[str, Path]] = None) -> str:
451461
"""Download an example of touchstone File and return the def path.
452462
@@ -475,6 +485,7 @@ def download_touchstone(local_path: Optional[Union[str, Path]] = None) -> str:
475485
return str(s6p_file)
476486

477487

488+
@pyaedt_function_handler(destination="local_path")
478489
def download_sherlock(local_path: Optional[Union[str, Path]] = None) -> str:
479490
"""Download an example of sherlock needed files and return the def path.
480491
@@ -506,6 +517,7 @@ def download_sherlock(local_path: Optional[Union[str, Path]] = None) -> str:
506517
return str(folder_path)
507518

508519

520+
@pyaedt_function_handler(destination="local_path")
509521
def download_leaf(local_path: Optional[Union[str, Path]] = None) -> Tuple[str, str]:
510522
"""Download an example of Nissan leaf files and return the def path.
511523
@@ -538,6 +550,7 @@ def download_leaf(local_path: Optional[Union[str, Path]] = None) -> Tuple[str, s
538550
return str(smooth_tab_path), str(magnetics_tab_path)
539551

540552

553+
@pyaedt_function_handler(destination="local_path")
541554
def download_custom_reports(force_download: bool = False, local_path: Optional[Union[str, Path]] = None) -> str:
542555
"""Download an example of CISPR25 with customer reports json template files.
543556
@@ -579,6 +592,7 @@ def download_custom_reports(force_download: bool = False, local_path: Optional[U
579592
return str(folder_path)
580593

581594

595+
@pyaedt_function_handler(destination="local_path")
582596
def download_3dcomponent(force_download=False, local_path: Optional[Union[str, Path]] = None) -> str:
583597
"""Download an example of 3d component array with json template files.
584598
@@ -619,6 +633,7 @@ def download_3dcomponent(force_download=False, local_path: Optional[Union[str, P
619633
return str(folder_path)
620634

621635

636+
@pyaedt_function_handler(destination="local_path")
622637
def download_fss_3dcomponent(force_download=False, local_path: Optional[Union[str, Path]] = None) -> str:
623638
"""Download an example of 3d component array with json template files.
624639
@@ -659,6 +674,7 @@ def download_fss_3dcomponent(force_download=False, local_path: Optional[Union[st
659674
return str(fodler_path)
660675

661676

677+
@pyaedt_function_handler(destination="local_path")
662678
def download_multiparts(local_path: Optional[Union[str, Path]] = None) -> str:
663679
"""Download an example of 3DComponents Multiparts.
664680
@@ -697,6 +713,7 @@ def download_multiparts(local_path: Optional[Union[str, Path]] = None) -> str:
697713
return str(local_path / "multiparts")
698714

699715

716+
@pyaedt_function_handler(destination="local_path")
700717
def download_twin_builder_data(
701718
file_name: Optional[str] = None, force_download=False, local_path: Optional[Union[str, Path]] = None
702719
) -> str:

0 commit comments

Comments
 (0)