Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Documentation build #142

Merged
merged 15 commits into from
Jun 21, 2024
Merged
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def copy_examples(app):
if os.path.exists(destination_dir):
size = directory_size(destination_dir)
logger.info(f"Directory {destination_dir} ({size} MB) already exist, removing it.")
shutil.rmtree(destination_dir)
shutil.rmtree(destination_dir, ignore_errors=True)
logger.info(f"Directory removed.")

shutil.copytree(EXAMPLES_DIRECTORY, destination_dir)
Expand Down
4 changes: 2 additions & 2 deletions examples/01-HFSS3DLayout/01_power_integrity.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@

h3d = Hfss3dLayout(
aedb,
specified_version=AEDT_VERSION,
version=AEDT_VERSION,
non_graphical=NG_MODE,
new_desktop_session=True
new_desktop=True
)

# ### Analyze
Expand Down
4 changes: 2 additions & 2 deletions examples/01-HFSS3DLayout/02_dc_ir_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@

siw = Hfss3dLayout(
aedb,
specified_version=AEDT_VERSION,
version=AEDT_VERSION,
non_graphical=NG_MODE,
new_desktop_session=True
new_desktop=True
)

# ## Analyze
Expand Down
2 changes: 1 addition & 1 deletion examples/01-HFSS3DLayout/03_gui_manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#
# Initialize AEDT and launch HFSS 3D Layout.

h3d = Hfss3dLayout(aedb, specified_version=AEDT_VERSION)
h3d = Hfss3dLayout(aedb, version=AEDT_VERSION)
h3d.save_project()

# ## Net visibility
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@
NG_MODE = False # Open the UI to view the layout.
h3d = Hfss3dLayout(
aedb,
specified_version=AEDT_VERSION,
version=AEDT_VERSION,
non_graphical=NG_MODE,
new_desktop_session=True
new_desktop=True
)

# ## Place SMA RF connector
Expand Down
6 changes: 3 additions & 3 deletions examples/01-HFSS3DLayout/08_pre_layout_parametrized_pcb.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,10 @@
# ## Open the project in HFSS 3D Layout.

h3d = Hfss3dLayout(
projectname=aedb_path,
specified_version=AEDT_VERSION,
project=aedb_path,
version=AEDT_VERSION,
non_graphical=True,
new_desktop_session=True,
new_desktop=True,
)

# ### Add a HFSS simulation setup
Expand Down
3 changes: 2 additions & 1 deletion examples/01-HFSS3DLayout/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
HFSS 3D Layout examples
~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
These examples use PyAEDT and PyEDB to show some end-to-end workflows for HFSS 3D Layout and SIwave.
This includes layout import, layout editing, S-parameter assignment, Spice model assignment, parameterized
pre-layout design creation.
Expand All @@ -13,4 +13,5 @@ pre-layout design creation.
06_ipc2581_export.py
07_import_gds.py
08_pre_layout_parametrized_pcb.py

.. 05_electrothermal_analysis.py
8 changes: 4 additions & 4 deletions examples/01-Modeling-Setup/Configurations.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
# Open the project, and save it to the temporary folder.

ipk = pyaedt.Icepak(
projectname=project_full_name,
specified_version=AEDT_VERSION,
new_desktop_session=True,
project=project_full_name,
version=AEDT_VERSION,
new_desktop=True,
non_graphical=non_graphical,
)
ipk.autosave_disable()
Expand Down Expand Up @@ -113,7 +113,7 @@
# Create an Icepak project and import the step.

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

# ## Import and apply configuration file
Expand Down
4 changes: 2 additions & 2 deletions examples/01-Modeling-Setup/HFSS_CoordinateSystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# ## Launch AEDT

d = pyaedt.launch_desktop(
specified_version=AEDT_VERSION, non_graphical=non_graphical, new_desktop_session=True
version=AEDT_VERSION, non_graphical=non_graphical, new_desktop=True
)

# ## Insert HFSS design
Expand All @@ -35,7 +35,7 @@
project_name = pyaedt.generate_unique_project_name(
rootname=temp_dir.name, project_name="CoordSysDemo"
)
hfss = pyaedt.Hfss(projectname=project_name)
hfss = pyaedt.Hfss(project=project_name)

# ## Create coordinate system
#
Expand Down
6 changes: 3 additions & 3 deletions examples/01-Modeling-Setup/Optimetrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
rootname=temp_dir.name, project_name="optimetrics"
)
hfss = pyaedt.Hfss(
projectname=project_name,
specified_version=AEDT_VERSION,
new_desktop_session=True,
project=project_name,
version=AEDT_VERSION,
new_desktop=True,
non_graphical=non_graphical,
)
hfss["w1"] = "1mm"
Expand Down
8 changes: 4 additions & 4 deletions examples/01-Modeling-Setup/Polyline_Primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@

project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="polyline")
maxwell = pyaedt.Maxwell3d(
projectname=project_name,
project=project_name,
solution_type="Transient",
designname="test_polyline_3D",
specified_version=AEDT_VERSION,
new_desktop_session=True,
design="test_polyline_3D",
version=AEDT_VERSION,
new_desktop=True,
non_graphical=non_graphical,
)
maxwell.modeler.model_units = "mm"
Expand Down
8 changes: 4 additions & 4 deletions examples/02-HFSS/Array.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@

project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="array")
hfss = pyaedt.Hfss(
projectname=project_name,
specified_version=AEDT_VERSION,
designname="Array_Simple",
project=project_name,
version=AEDT_VERSION,
design="Array_Simple",
non_graphical=non_graphical,
new_desktop_session=True,
new_desktop=True,
)

print("Project name " + project_name)
Expand Down
4 changes: 2 additions & 2 deletions examples/02-HFSS/Create_3d_Component_and_use_it.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#
# Launch AEDT, create an HFSS design, and save the project.

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

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

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

# ## Insert 3D component
#
Expand Down
4 changes: 2 additions & 2 deletions examples/02-HFSS/Flex_CPWG.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
# Launch AEDT, create an HFSS design, and save the project.

hfss = pyaedt.Hfss(
specified_version=AEDT_VERSION,
version=AEDT_VERSION,
solution_type="DrivenTerminal",
new_desktop_session=True,
new_desktop=True,
non_graphical=non_graphical,
)
hfss.save_project(os.path.join(temp_dir.name, generate_unique_name("example") + ".aedt"))
Expand Down
6 changes: 3 additions & 3 deletions examples/02-HFSS/HFSS_Choke.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@

project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="choke")
hfss = pyaedt.Hfss(
projectname=project_name,
specified_version=AEDT_VERSION,
project=project_name,
version=AEDT_VERSION,
non_graphical=non_graphical,
new_desktop_session=True,
new_desktop=True,
solution_type="Terminal",
)

Expand Down
4 changes: 2 additions & 2 deletions examples/02-HFSS/HFSS_Dipole.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@

# ## Launch AEDT

d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop_session=True)
d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop=True)

# ## Launch HFSS
#
# Create a new HFSS design.

project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="dipole")
hfss = pyaedt.Hfss(projectname=project_name, solution_type="Modal")
hfss = pyaedt.Hfss(project=project_name, solution_type="Modal")

# ## Define variable
#
Expand Down
4 changes: 2 additions & 2 deletions examples/02-HFSS/HFSS_FSS_unitcell.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
# ## Launch AEDT

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

# ## Launch HFSS
#
# Create a new HFSS design.

hfss = pyaedt.Hfss(projectname=project_name, solution_type="Modal")
hfss = pyaedt.Hfss(project=project_name, solution_type="Modal")

# ## Define variable
#
Expand Down
8 changes: 4 additions & 4 deletions examples/02-HFSS/HFSS_Spiral.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@

project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="spiral")
hfss = pyaedt.Hfss(
projectname=project_name,
specified_version=AEDT_VERSION,
project=project_name,
version=AEDT_VERSION,
non_graphical=non_graphical,
designname="A1",
new_desktop_session=True,
design="A1",
new_desktop=True,
solution_type="Modal"
)
hfss.modeler.model_units = "um"
Expand Down
4 changes: 2 additions & 2 deletions examples/02-HFSS/HFSS_eigenmode.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@

# ## Launch AEDT

d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop_session=True)
d = pyaedt.launch_desktop(AEDT_VERSION, non_graphical=non_graphical, new_desktop=True)

# ## Launch HFSS
#
# Create a new HFSS design.

hfss = pyaedt.Hfss(projectname=project_path, non_graphical=non_graphical)
hfss = pyaedt.Hfss(project=project_path, non_graphical=non_graphical)

# ## Input parameters for eigenmode solver
#
Expand Down
8 changes: 4 additions & 4 deletions examples/02-HFSS/Probe_Fed_Patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@

project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="patch")
hfss = pyaedt.Hfss(
projectname=project_name,
project=project_name,
solution_type="Terminal",
designname="patch",
design="patch",
non_graphical=non_graphical,
new_desktop_session=True,
specified_version=AEDT_VERSION,
new_desktop=True,
version=AEDT_VERSION,
)

length_units = "mm"
Expand Down
8 changes: 4 additions & 4 deletions examples/02-HFSS/Waveguide_Filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@
# ### Create the HFSS design

hfss = pyaedt.Hfss(
projectname=project_name,
specified_version=AEDT_VERSION,
designname="filter",
project=project_name,
version=AEDT_VERSION,
design="filter",
solution_type="Modal",
non_graphical=non_graphical,
new_desktop_session=True,
new_desktop=True,
close_on_exit=True,
)

Expand Down
8 changes: 4 additions & 4 deletions examples/02-SBR+/SBR_City_Import.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@

project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="city")
app = pyaedt.Hfss(
projectname=project_name,
designname="Ansys",
project=project_name,
design="Ansys",
solution_type="SBR+",
specified_version=AEDT_VERSION,
new_desktop_session=True,
version=AEDT_VERSION,
new_desktop=True,
non_graphical=non_graphical,
)

Expand Down
10 changes: 5 additions & 5 deletions examples/02-SBR+/SBR_Doppler_Example.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@

project_name = pyaedt.generate_unique_project_name(rootname=temp_dir.name, project_name="doppler")
app = pyaedt.Hfss(
specified_version=AEDT_VERSION,
version=AEDT_VERSION,
solution_type="SBR+",
new_desktop_session=True,
projectname=project_name,
new_desktop=True,
project=project_name,
close_on_exit=True,
non_graphical=non_graphical,
)
Expand All @@ -51,8 +51,8 @@
#
# Save the project to the temporary folder and rename the design.

designname = "doppler_sbr"
app.rename_design(designname)
design = "doppler_sbr"
app.rename_design(design)
app.save_project()

# ## Set up library paths
Expand Down
14 changes: 7 additions & 7 deletions examples/02-SBR+/SBR_Example.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@

# +
target = pyaedt.Hfss(
projectname=project_full_name,
designname="Cassegrain_",
project=project_full_name,
design="Cassegrain_",
solution_type="SBR+",
specified_version=AEDT_VERSION,
new_desktop_session=True,
version=AEDT_VERSION,
new_desktop=True,
non_graphical=non_graphical,
)

source = pyaedt.Hfss(
projectname=target.project_name,
designname="feeder",
specified_version=AEDT_VERSION,
project=target.project_name,
design="feeder",
version=AEDT_VERSION,
)
# -

Expand Down
6 changes: 3 additions & 3 deletions examples/02-SBR+/SBR_Time_Plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
# ## Launch HFSS and analyze

hfss = Hfss(
projectname=project_file,
specified_version=AEDT_VERSION,
project=project_file,
version=AEDT_VERSION,
non_graphical=non_graphical,
new_desktop_session=True,
new_desktop=True,
)

hfss.analyze(num_cores=NUM_CORES)
Expand Down
Loading
Loading