Skip to content

Commit 2358795

Browse files
authored
FIX: Documentation build (#142)
* DOCS: Add non uploaded file * DOCS: fix typos in RST files * DOCS: Fix Circuit_Example.py release * DOCS: Fix wrong file name * TBR: Focus on Circuit issue * FIX: Circuit examples * Revert "TBR: Focus on Circuit issue" This reverts commit a9889b2. * FIX: Remove deprecated arguments * WIP: avoid deprecated arguments * WIP: Rewrite failing example * TBR: Test changes * Revert "TBR: Test changes" This reverts commit 892bd0c. * TBR: Commenting failing example * Revert "TBR: Commenting failing example" This reverts commit 52f03b9. * CHORE: Add changes from pyaedt
1 parent 7ba08be commit 2358795

File tree

66 files changed

+369
-328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+369
-328
lines changed

doc/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def copy_examples(app):
9292
if os.path.exists(destination_dir):
9393
size = directory_size(destination_dir)
9494
logger.info(f"Directory {destination_dir} ({size} MB) already exist, removing it.")
95-
shutil.rmtree(destination_dir)
95+
shutil.rmtree(destination_dir, ignore_errors=True)
9696
logger.info(f"Directory removed.")
9797

9898
shutil.copytree(EXAMPLES_DIRECTORY, destination_dir)

examples/01-HFSS3DLayout/01_power_integrity.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@
191191

192192
h3d = Hfss3dLayout(
193193
aedb,
194-
specified_version=AEDT_VERSION,
194+
version=AEDT_VERSION,
195195
non_graphical=NG_MODE,
196-
new_desktop_session=True
196+
new_desktop=True
197197
)
198198

199199
# ### Analyze

examples/01-HFSS3DLayout/02_dc_ir_analysis.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@
209209

210210
siw = Hfss3dLayout(
211211
aedb,
212-
specified_version=AEDT_VERSION,
212+
version=AEDT_VERSION,
213213
non_graphical=NG_MODE,
214-
new_desktop_session=True
214+
new_desktop=True
215215
)
216216

217217
# ## Analyze

examples/01-HFSS3DLayout/03_gui_manipulation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#
3333
# Initialize AEDT and launch HFSS 3D Layout.
3434

35-
h3d = Hfss3dLayout(aedb, specified_version=AEDT_VERSION)
35+
h3d = Hfss3dLayout(aedb, version=AEDT_VERSION)
3636
h3d.save_project()
3737

3838
# ## Net visibility

examples/01-HFSS3DLayout/04_pre_layout_sma_connector_on_pcb.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@
265265
NG_MODE = False # Open the UI to view the layout.
266266
h3d = Hfss3dLayout(
267267
aedb,
268-
specified_version=AEDT_VERSION,
268+
version=AEDT_VERSION,
269269
non_graphical=NG_MODE,
270-
new_desktop_session=True
270+
new_desktop=True
271271
)
272272

273273
# ## Place SMA RF connector

examples/01-HFSS3DLayout/08_pre_layout_parametrized_pcb.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,10 @@
297297
# ## Open the project in HFSS 3D Layout.
298298

299299
h3d = Hfss3dLayout(
300-
projectname=aedb_path,
301-
specified_version=AEDT_VERSION,
300+
project=aedb_path,
301+
version=AEDT_VERSION,
302302
non_graphical=True,
303-
new_desktop_session=True,
303+
new_desktop=True,
304304
)
305305

306306
# ### Add a HFSS simulation setup

examples/01-HFSS3DLayout/index.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
HFSS 3D Layout examples
2-
~~~~~~~~~~~~~
2+
~~~~~~~~~~~~~~~~~~~~~~~
33
These examples use PyAEDT and PyEDB to show some end-to-end workflows for HFSS 3D Layout and SIwave.
44
This includes layout import, layout editing, S-parameter assignment, Spice model assignment, parameterized
55
pre-layout design creation.
@@ -13,4 +13,5 @@ pre-layout design creation.
1313
06_ipc2581_export.py
1414
07_import_gds.py
1515
08_pre_layout_parametrized_pcb.py
16+
1617
.. 05_electrothermal_analysis.py

examples/01-Modeling-Setup/Configurations.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
# Open the project, and save it to the temporary folder.
5252

5353
ipk = pyaedt.Icepak(
54-
projectname=project_full_name,
55-
specified_version=AEDT_VERSION,
56-
new_desktop_session=True,
54+
project=project_full_name,
55+
version=AEDT_VERSION,
56+
new_desktop=True,
5757
non_graphical=non_graphical,
5858
)
5959
ipk.autosave_disable()
@@ -113,7 +113,7 @@
113113
# Create an Icepak project and import the step.
114114

115115
new_project = os.path.join(temp_dir.name, generate_unique_name("example") + ".aedt")
116-
app = pyaedt.Icepak(projectname=new_project)
116+
app = pyaedt.Icepak(project=new_project)
117117
app.modeler.import_3d_cad(file_path)
118118

119119
# ## Import and apply configuration file

examples/01-Modeling-Setup/HFSS_CoordinateSystem.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# ## Launch AEDT
2626

2727
d = pyaedt.launch_desktop(
28-
specified_version=AEDT_VERSION, non_graphical=non_graphical, new_desktop_session=True
28+
version=AEDT_VERSION, non_graphical=non_graphical, new_desktop=True
2929
)
3030

3131
# ## Insert HFSS design
@@ -35,7 +35,7 @@
3535
project_name = pyaedt.generate_unique_project_name(
3636
rootname=temp_dir.name, project_name="CoordSysDemo"
3737
)
38-
hfss = pyaedt.Hfss(projectname=project_name)
38+
hfss = pyaedt.Hfss(project=project_name)
3939

4040
# ## Create coordinate system
4141
#

examples/01-Modeling-Setup/Optimetrics.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
rootname=temp_dir.name, project_name="optimetrics"
3535
)
3636
hfss = pyaedt.Hfss(
37-
projectname=project_name,
38-
specified_version=AEDT_VERSION,
39-
new_desktop_session=True,
37+
project=project_name,
38+
version=AEDT_VERSION,
39+
new_desktop=True,
4040
non_graphical=non_graphical,
4141
)
4242
hfss["w1"] = "1mm"

examples/01-Modeling-Setup/Polyline_Primitives.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929

3030
project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="polyline")
3131
maxwell = pyaedt.Maxwell3d(
32-
projectname=project_name,
32+
project=project_name,
3333
solution_type="Transient",
34-
designname="test_polyline_3D",
35-
specified_version=AEDT_VERSION,
36-
new_desktop_session=True,
34+
design="test_polyline_3D",
35+
version=AEDT_VERSION,
36+
new_desktop=True,
3737
non_graphical=non_graphical,
3838
)
3939
maxwell.modeler.model_units = "mm"

examples/02-HFSS/Array.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141

4242
project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="array")
4343
hfss = pyaedt.Hfss(
44-
projectname=project_name,
45-
specified_version=AEDT_VERSION,
46-
designname="Array_Simple",
44+
project=project_name,
45+
version=AEDT_VERSION,
46+
design="Array_Simple",
4747
non_graphical=non_graphical,
48-
new_desktop_session=True,
48+
new_desktop=True,
4949
)
5050

5151
print("Project name " + project_name)

examples/02-HFSS/Create_3d_Component_and_use_it.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#
2929
# Launch AEDT, create an HFSS design, and save the project.
3030

31-
hfss = Hfss(specified_version=AEDT_VERSION, new_desktop_session=True, close_on_exit=True)
31+
hfss = Hfss(version=AEDT_VERSION, new_desktop=True, close_on_exit=True)
3232
hfss.save_project(os.path.join(temp_dir.name, generate_unique_name("example") + ".aedt"))
3333

3434
# ## Variable definition
@@ -111,7 +111,7 @@
111111
# PyAEDT allows to control multiple projects, design and solution type at the same time.
112112

113113
new_project = os.path.join(temp_dir.name, generate_unique_name("new_project") + ".aedt")
114-
hfss2 = Hfss(projectname=new_project, designname="new_design")
114+
hfss2 = Hfss(project=new_project, design="new_design")
115115

116116
# ## Insert 3D component
117117
#

examples/02-HFSS/Flex_CPWG.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
# Launch AEDT, create an HFSS design, and save the project.
3434

3535
hfss = pyaedt.Hfss(
36-
specified_version=AEDT_VERSION,
36+
version=AEDT_VERSION,
3737
solution_type="DrivenTerminal",
38-
new_desktop_session=True,
38+
new_desktop=True,
3939
non_graphical=non_graphical,
4040
)
4141
hfss.save_project(os.path.join(temp_dir.name, generate_unique_name("example") + ".aedt"))

examples/02-HFSS/HFSS_Choke.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030

3131
project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="choke")
3232
hfss = pyaedt.Hfss(
33-
projectname=project_name,
34-
specified_version=AEDT_VERSION,
33+
project=project_name,
34+
version=AEDT_VERSION,
3535
non_graphical=non_graphical,
36-
new_desktop_session=True,
36+
new_desktop=True,
3737
solution_type="Terminal",
3838
)
3939

examples/02-HFSS/HFSS_Dipole.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828

2929
# ## Launch AEDT
3030

31-
d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop_session=True)
31+
d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop=True)
3232

3333
# ## Launch HFSS
3434
#
3535
# Create a new HFSS design.
3636

3737
project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="dipole")
38-
hfss = pyaedt.Hfss(projectname=project_name, solution_type="Modal")
38+
hfss = pyaedt.Hfss(project=project_name, solution_type="Modal")
3939

4040
# ## Define variable
4141
#

examples/02-HFSS/HFSS_FSS_unitcell.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
# ## Launch AEDT
3030

3131
project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="FSS")
32-
d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop_session=True)
32+
d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop=True)
3333

3434
# ## Launch HFSS
3535
#
3636
# Create a new HFSS design.
3737

38-
hfss = pyaedt.Hfss(projectname=project_name, solution_type="Modal")
38+
hfss = pyaedt.Hfss(project=project_name, solution_type="Modal")
3939

4040
# ## Define variable
4141
#

examples/02-HFSS/HFSS_Spiral.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434

3535
project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="spiral")
3636
hfss = pyaedt.Hfss(
37-
projectname=project_name,
38-
specified_version=AEDT_VERSION,
37+
project=project_name,
38+
version=AEDT_VERSION,
3939
non_graphical=non_graphical,
40-
designname="A1",
41-
new_desktop_session=True,
40+
design="A1",
41+
new_desktop=True,
4242
solution_type="Modal"
4343
)
4444
hfss.modeler.model_units = "um"

examples/02-HFSS/HFSS_eigenmode.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@
5454

5555
# ## Launch AEDT
5656

57-
d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop_session=True)
57+
d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop=True)
5858

5959
# ## Launch HFSS
6060
#
6161
# Create a new HFSS design.
6262

63-
hfss = pyaedt.Hfss(projectname=project_path, non_graphical=non_graphical)
63+
hfss = pyaedt.Hfss(project=project_path, non_graphical=non_graphical)
6464

6565
# ## Input parameters for eigenmode solver
6666
#

examples/02-HFSS/Probe_Fed_Patch.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535

3636
project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="patch")
3737
hfss = pyaedt.Hfss(
38-
projectname=project_name,
38+
project=project_name,
3939
solution_type="Terminal",
40-
designname="patch",
40+
design="patch",
4141
non_graphical=non_graphical,
42-
new_desktop_session=True,
43-
specified_version=AEDT_VERSION,
42+
new_desktop=True,
43+
version=AEDT_VERSION,
4444
)
4545

4646
length_units = "mm"

examples/02-HFSS/Waveguide_Filter.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@
5353
# ### Create the HFSS design
5454

5555
hfss = pyaedt.Hfss(
56-
projectname=project_name,
57-
specified_version=AEDT_VERSION,
58-
designname="filter",
56+
project=project_name,
57+
version=AEDT_VERSION,
58+
design="filter",
5959
solution_type="Modal",
6060
non_graphical=non_graphical,
61-
new_desktop_session=True,
61+
new_desktop=True,
6262
close_on_exit=True,
6363
)
6464

examples/02-SBR+/SBR_City_Import.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333

3434
project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="city")
3535
app = pyaedt.Hfss(
36-
projectname=project_name,
37-
designname="Ansys",
36+
project=project_name,
37+
design="Ansys",
3838
solution_type="SBR+",
39-
specified_version=AEDT_VERSION,
40-
new_desktop_session=True,
39+
version=AEDT_VERSION,
40+
new_desktop=True,
4141
non_graphical=non_graphical,
4242
)
4343

examples/02-SBR+/SBR_Doppler_Example.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737

3838
project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="doppler")
3939
app = pyaedt.Hfss(
40-
specified_version=AEDT_VERSION,
40+
version=AEDT_VERSION,
4141
solution_type="SBR+",
42-
new_desktop_session=True,
43-
projectname=project_name,
42+
new_desktop=True,
43+
project=project_name,
4444
close_on_exit=True,
4545
non_graphical=non_graphical,
4646
)
@@ -51,8 +51,8 @@
5151
#
5252
# Save the project to the temporary folder and rename the design.
5353

54-
designname = "doppler_sbr"
55-
app.rename_design(designname)
54+
design = "doppler_sbr"
55+
app.rename_design(design)
5656
app.save_project()
5757

5858
# ## Set up library paths

examples/02-SBR+/SBR_Example.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@
3838

3939
# +
4040
target = pyaedt.Hfss(
41-
projectname=project_full_name,
42-
designname="Cassegrain_",
41+
project=project_full_name,
42+
design="Cassegrain_",
4343
solution_type="SBR+",
44-
specified_version=AEDT_VERSION,
45-
new_desktop_session=True,
44+
version=AEDT_VERSION,
45+
new_desktop=True,
4646
non_graphical=non_graphical,
4747
)
4848

4949
source = pyaedt.Hfss(
50-
projectname=target.project_name,
51-
designname="feeder",
52-
specified_version=AEDT_VERSION,
50+
project=target.project_name,
51+
design="feeder",
52+
version=AEDT_VERSION,
5353
)
5454
# -
5555

examples/02-SBR+/SBR_Time_Plot.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434
# ## Launch HFSS and analyze
3535

3636
hfss = Hfss(
37-
projectname=project_file,
38-
specified_version=AEDT_VERSION,
37+
project=project_file,
38+
version=AEDT_VERSION,
3939
non_graphical=non_graphical,
40-
new_desktop_session=True,
40+
new_desktop=True,
4141
)
4242

4343
hfss.analyze(num_cores=NUM_CORES)

0 commit comments

Comments
 (0)