Skip to content

Commit cfb7f15

Browse files
committed
Merge branch 'docs/use-ansys-autoapi-bis' into docs/use-ansys-autoapi
2 parents fba9515 + 0bd0c7c commit cfb7f15

File tree

2 files changed

+185
-71
lines changed

2 files changed

+185
-71
lines changed

doc/source/API/index.rst

+116-20
Original file line numberDiff line numberDiff line change
@@ -75,27 +75,123 @@ Example with ``Desktop`` class implicit initialization:
7575
circuit.release_desktop()
7676
7777
78+
.. .. toctree::
79+
.. :maxdepth: 2
80+
81+
.. Application
82+
.. MaterialManagement
83+
.. Primitives3D
84+
.. Primitives2D
85+
.. Primitive_Objects
86+
.. Primitives3DLayout
87+
.. PrimitivesCircuit
88+
.. Boundaries
89+
.. Mesh
90+
.. Setup
91+
.. Post
92+
.. DesktopMessenger
93+
.. Optimetrics
94+
.. Variables
95+
.. Constants
96+
.. Configuration
97+
.. SetupTemplates
98+
.. CableModeling
7899
.. toctree::
79-
:maxdepth: 2
80-
81-
Application
82-
MaterialManagement
83-
Primitives3D
84-
Primitives2D
85-
Primitive_Objects
86-
Primitives3DLayout
87-
PrimitivesCircuit
88-
Boundaries
89-
Mesh
90-
Setup
91-
Post
92-
DesktopMessenger
93-
Optimetrics
94-
Variables
95-
Constants
96-
Configuration
97-
SetupTemplates
98-
CableModeling
100+
:titlesonly:
101+
:maxdepth: 3
102+
103+
<span class="nf nf-md-package"></span> pyaedt.misc.misc</api/pyaedt/misc/misc/index>
104+
<span class="nf nf-md-package"></span> pyaedt.generic.pdf</api/pyaedt/generic/pdf/index>
105+
<span class="nf nf-md-package"></span> pyaedt.modeler.cad</api/pyaedt/modeler/cad/index>
106+
<span class="nf nf-md-package"></span> pyaedt.modeler.pcb</api/pyaedt/modeler/pcb/index>
107+
<span class="nf nf-md-package"></span> pyaedt.generic.plot</api/pyaedt/generic/plot/index>
108+
<span class="nf nf-md-package"></span> pyaedt.modules.Mesh</api/pyaedt/modules/Mesh/index>
109+
<span class="nf nf-md-package"></span> pyaedt.sbrplus.plot</api/pyaedt/sbrplus/plot/index>
110+
<span class="nf nf-md-package"></span> pyaedt.workflows.q2d</api/pyaedt/workflows/q2d/index>
111+
<span class="nf nf-md-package"></span> pyaedt.workflows.q3d</api/pyaedt/workflows/q3d/index>
112+
<span class="nf nf-md-package"></span> pyaedt.generic.spisim</api/pyaedt/generic/spisim/index>
113+
<span class="nf nf-md-package"></span> pyaedt.workflows.misc</api/pyaedt/workflows/misc/index>
114+
<span class="nf nf-md-package"></span> pyaedt.workflows.emit</api/pyaedt/workflows/emit/index>
115+
<span class="nf nf-md-package"></span> pyaedt.workflows.hfss</api/pyaedt/workflows/hfss/index>
116+
<span class="nf nf-md-package"></span> pyaedt.generic.settings</api/pyaedt/generic/settings/index>
117+
<span class="nf nf-md-package"></span> pyaedt.modeler.circuits</api/pyaedt/modeler/circuits/index>
118+
<span class="nf nf-md-package"></span> pyaedt.modules.Boundary</api/pyaedt/modules/Boundary/index>
119+
<span class="nf nf-md-package"></span> pyaedt.modules.Material</api/pyaedt/modules/Material/index>
120+
<span class="nf nf-md-package"></span> pyaedt.rpc.local_server</api/pyaedt/rpc/local_server/index>
121+
<span class="nf nf-md-package"></span> pyaedt.workflows.icepak</api/pyaedt/workflows/icepak/index>
122+
<span class="nf nf-md-package"></span> pyaedt.emit_core.results</api/pyaedt/emit_core/results/index>
123+
<span class="nf nf-md-package"></span> pyaedt.generic.constants</api/pyaedt/generic/constants/index>
124+
<span class="nf nf-md-package"></span> pyaedt.modeler.modeler2d</api/pyaedt/modeler/modeler2d/index>
125+
<span class="nf nf-md-package"></span> pyaedt.modeler.modeler3d</api/pyaedt/modeler/modeler3d/index>
126+
<span class="nf nf-md-package"></span> pyaedt.modeler.schematic</api/pyaedt/modeler/schematic/index>
127+
<span class="nf nf-md-package"></span> pyaedt.modules.solutions</api/pyaedt/modules/solutions/index>
128+
<span class="nf nf-md-package"></span> pyaedt.rpc.rpyc_services</api/pyaedt/rpc/rpyc_services/index>
129+
<span class="nf nf-md-package"></span> pyaedt.sbrplus.hdm_utils</api/pyaedt/sbrplus/hdm_utils/index>
130+
<span class="nf nf-md-package"></span> pyaedt.workflows.circuit</api/pyaedt/workflows/circuit/index>
131+
<span class="nf nf-md-package"></span> pyaedt.workflows.project</api/pyaedt/workflows/project/index>
132+
<span class="nf nf-md-package"></span> pyaedt.application.Design</api/pyaedt/application/Design/index>
133+
<span class="nf nf-md-package"></span> pyaedt.generic.clr_module</api/pyaedt/generic/clr_module/index>
134+
<span class="nf nf-md-package"></span> pyaedt.generic.compliance</api/pyaedt/generic/compliance/index>
135+
<span class="nf nf-md-package"></span> pyaedt.generic.filesystem</api/pyaedt/generic/filesystem/index>
136+
<span class="nf nf-md-package"></span> pyaedt.modeler.modelerpcb</api/pyaedt/modeler/modelerpcb/index>
137+
<span class="nf nf-md-package"></span> pyaedt.modules.MeshIcepak</api/pyaedt/modules/MeshIcepak/index>
138+
<span class="nf nf-md-package"></span> pyaedt.modules.SolveSetup</api/pyaedt/modules/SolveSetup/index>
139+
<span class="nf nf-md-package"></span> pyaedt.sbrplus.hdm_parser</api/pyaedt/sbrplus/hdm_parser/index>
140+
<span class="nf nf-md-package"></span> pyaedt.emit_core.Couplings</api/pyaedt/emit_core/Couplings/index>
141+
<span class="nf nf-md-package"></span> pyaedt.generic.ibis_reader</api/pyaedt/generic/ibis_reader/index>
142+
<span class="nf nf-md-package"></span> pyaedt.modeler.calculators</api/pyaedt/modeler/calculators/index>
143+
<span class="nf nf-md-package"></span> pyaedt.modules.MaterialLib</api/pyaedt/modules/MaterialLib/index>
144+
<span class="nf nf-md-package"></span> pyaedt.modules.SolveSweeps</api/pyaedt/modules/SolveSweeps/index>
145+
<span class="nf nf-md-package"></span> pyaedt.workflows.installer</api/pyaedt/workflows/installer/index>
146+
<span class="nf nf-md-package"></span> pyaedt.workflows.maxwell2d</api/pyaedt/workflows/maxwell2d/index>
147+
<span class="nf nf-md-package"></span> pyaedt.workflows.maxwell3d</api/pyaedt/workflows/maxwell3d/index>
148+
<span class="nf nf-md-package"></span> pyaedt.workflows.templates</api/pyaedt/workflows/templates/index>
149+
<span class="nf nf-md-package"></span> pyaedt.application.Analysis</api/pyaedt/application/Analysis/index>
150+
<span class="nf nf-md-package"></span> pyaedt.generic.DataHandlers</api/pyaedt/generic/DataHandlers/index>
151+
<span class="nf nf-md-package"></span> pyaedt.generic.design_types</api/pyaedt/generic/design_types/index>
152+
<span class="nf nf-md-package"></span> pyaedt.generic.LoadAEDTFile</api/pyaedt/generic/LoadAEDTFile/index>
153+
<span class="nf nf-md-package"></span> pyaedt.modeler.advanced_cad</api/pyaedt/modeler/advanced_cad/index>
154+
<span class="nf nf-md-package"></span> pyaedt.modules.LayerStackup</api/pyaedt/modules/LayerStackup/index>
155+
<span class="nf nf-md-package"></span> pyaedt.modules.Mesh3DLayout</api/pyaedt/modules/Mesh3DLayout/index>
156+
<span class="nf nf-md-package"></span> pyaedt.workflows.mechanical</api/pyaedt/workflows/mechanical/index>
157+
<span class="nf nf-md-package"></span> pyaedt.application.Variables</api/pyaedt/application/Variables/index>
158+
<span class="nf nf-md-package"></span> pyaedt.modules.CableModeling</api/pyaedt/modules/CableModeling/index>
159+
<span class="nf nf-md-package"></span> pyaedt.modules.PostProcessor</api/pyaedt/modules/PostProcessor/index>
160+
<span class="nf nf-md-package"></span> pyaedt.workflows.twinbuilder</api/pyaedt/workflows/twinbuilder/index>
161+
<span class="nf nf-md-package"></span> pyaedt.application.Analysis3D</api/pyaedt/application/Analysis3D/index>
162+
<span class="nf nf-md-package"></span> pyaedt.application.JobManager</api/pyaedt/application/JobManager/index>
163+
<span class="nf nf-md-package"></span> pyaedt.generic.com_parameters</api/pyaedt/generic/com_parameters/index>
164+
<span class="nf nf-md-package"></span> pyaedt.generic.configurations</api/pyaedt/generic/configurations/index>
165+
<span class="nf nf-md-package"></span> pyaedt.misc.create_remote_dir</api/pyaedt/misc/create_remote_dir/index>
166+
<span class="nf nf-md-package"></span> pyaedt.modules.monitor_icepak</api/pyaedt/modules/monitor_icepak/index>
167+
<span class="nf nf-md-package"></span> pyaedt.modules.SetupTemplates</api/pyaedt/modules/SetupTemplates/index>
168+
<span class="nf nf-md-package"></span> pyaedt.workflows.hfss3dlayout</api/pyaedt/workflows/hfss3dlayout/index>
169+
<span class="nf nf-md-package"></span> pyaedt.application.analysis_hf</api/pyaedt/application/analysis_hf/index>
170+
<span class="nf nf-md-package"></span> pyaedt.generic.general_methods</api/pyaedt/generic/general_methods/index>
171+
<span class="nf nf-md-package"></span> pyaedt.application.aedt_objects</api/pyaedt/application/aedt_objects/index>
172+
<span class="nf nf-md-package"></span> pyaedt.emit_core.emit_constants</api/pyaedt/emit_core/emit_constants/index>
173+
<span class="nf nf-md-package"></span> pyaedt.generic.desktop_sessions</api/pyaedt/generic/desktop_sessions/index>
174+
<span class="nf nf-md-package"></span> pyaedt.modules.CircuitTemplates</api/pyaedt/modules/CircuitTemplates/index>
175+
<span class="nf nf-md-package"></span> pyaedt.modules.DesignXPloration</api/pyaedt/modules/DesignXPloration/index>
176+
<span class="nf nf-md-package"></span> pyaedt.modules.report_templates</api/pyaedt/modules/report_templates/index>
177+
<span class="nf nf-md-package"></span> pyaedt.generic.near_field_import</api/pyaedt/generic/near_field_import/index>
178+
<span class="nf nf-md-package"></span> pyaedt.generic.python_optimizers</api/pyaedt/generic/python_optimizers/index>
179+
<span class="nf nf-md-package"></span> pyaedt.generic.touchstone_parser</api/pyaedt/generic/touchstone_parser/index>
180+
<span class="nf nf-md-package"></span> pyaedt.modules.fields_calculator</api/pyaedt/modules/fields_calculator/index>
181+
<span class="nf nf-md-package"></span> pyaedt.application.AnalysisNexxim</api/pyaedt/application/AnalysisNexxim/index>
182+
<span class="nf nf-md-package"></span> pyaedt.application.AnalysisRMxprt</api/pyaedt/application/AnalysisRMxprt/index>
183+
<span class="nf nf-md-package"></span> pyaedt.generic.report_file_parser</api/pyaedt/generic/report_file_parser/index>
184+
<span class="nf nf-md-package"></span> pyaedt.modeler.geometry_operators</api/pyaedt/modeler/geometry_operators/index>
185+
<span class="nf nf-md-package"></span> pyaedt.application.Analysis3DLayout</api/pyaedt/application/Analysis3DLayout/index>
186+
<span class="nf nf-md-package"></span> pyaedt.application.design_solutions</api/pyaedt/application/design_solutions/index>
187+
<span class="nf nf-md-package"></span> pyaedt.modules.OptimetricsTemplates</api/pyaedt/modules/OptimetricsTemplates/index>
188+
<span class="nf nf-md-package"></span> pyaedt.generic.grpc_plugin_dll_class</api/pyaedt/generic/grpc_plugin_dll_class/index>
189+
<span class="nf nf-md-package"></span> pyaedt.modules.AdvancedPostProcessing</api/pyaedt/modules/AdvancedPostProcessing/index>
190+
<span class="nf nf-md-package"></span> pyaedt.application.AnalysisTwinBuilder</api/pyaedt/application/AnalysisTwinBuilder/index>
191+
<span class="nf nf-md-package"></span> pyaedt.application.AEDT_File_Management</api/pyaedt/application/AEDT_File_Management/index>
192+
<span class="nf nf-md-package"></span> pyaedt.application.AnalysisMaxwellCircuit</api/pyaedt/application/AnalysisMaxwellCircuit/index>
193+
<span class="nf nf-md-package"></span> pyaedt.workflows.customize_automation_tab</api/pyaedt/workflows/customize_automation_tab/index>
194+
<span class="nf nf-md-package"></span> pyaedt.misc.spisim_com_configuration_files</api/pyaedt/misc/spisim_com_configuration_files/index>
99195

100196

101197

doc/source/conf.py

+69-51
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,23 @@ def run(self):
6565
addnodes.desc_content('', literal)
6666
]
6767

68+
from ansys_sphinx_theme import get_autoapi_templates_dir_relative_path
69+
autoapi_type = "python"
70+
autoapi_dirs = ["../../pyaedt"]
71+
autoapi_root = "api"
72+
autoapi_options = [
73+
"members",
74+
"undoc-members",
75+
"show-inheritance",
76+
"show-module-summary",
77+
"special-members",
78+
]
79+
autoapi_template_dir = get_autoapi_templates_dir_relative_path(pathlib.Path(__file__))
80+
autoapi_python_use_implicit_namespaces = True
81+
autoapi_keep_files = True
82+
autoapi_own_page_level = "class"
83+
autoapi_add_toctree_entry = False
84+
6885

6986
def autodoc_skip_member(app, what, name, obj, skip, options):
7087
try:
@@ -140,6 +157,7 @@ def setup(app):
140157
# ones.
141158
extensions = [
142159
"ansys_sphinx_theme.extension.linkcode",
160+
"ansys_sphinx_theme.extension.autoapi",
143161
"numpydoc",
144162
"recommonmark",
145163
"sphinx.ext.autodoc",
@@ -258,57 +276,57 @@ def setup(app):
258276

259277
# gallery build requires AEDT install
260278
# if is_windows and bool(os.getenv("PYAEDT_CI_RUN_EXAMPLES", "0")):
261-
if run_examples:
262-
import pyvista
263-
264-
# PyVista settings
265-
266-
# Ensure that offscreen rendering is used for docs generation
267-
pyvista.OFF_SCREEN = True
268-
# Save figures in specified directory
269-
pyvista.FIGURE_PATH = os.path.join(os.path.abspath("./images/"), "auto-generated/")
270-
if not os.path.exists(pyvista.FIGURE_PATH):
271-
os.makedirs(pyvista.FIGURE_PATH)
272-
# Necessary for pyvista when building the sphinx gallery
273-
pyvista.BUILDING_GALLERY = True
274-
275-
# Manage errors
276-
pyvista.set_error_output_file("errors.txt")
277-
# Must be less than or equal to the XVFB window size
278-
pyvista.global_theme["window_size"] = np.array([1024, 768])
279-
280-
# suppress annoying matplotlib bug
281-
warnings.filterwarnings(
282-
"ignore",
283-
category=UserWarning,
284-
message="Matplotlib is currently using agg, which is a non-GUI backend, so it cannot show the figure.",
285-
)
286-
287-
extensions.append("sphinx_gallery.gen_gallery")
288-
sphinx_gallery_conf = {
289-
# convert rst to md for ipynb
290-
"pypandoc": True,
291-
# path to your examples scripts
292-
"examples_dirs": ["../../examples/"],
293-
# path where to save gallery generated examples
294-
"gallery_dirs": ["examples"],
295-
# Pattern to search for examples files
296-
"filename_pattern": r"\.py",
297-
# Remove the "Download all examples" button from the top level gallery
298-
"download_all_examples": False,
299-
# Sort gallery examples by file name instead of number of lines (default)
300-
"within_subsection_order": FileNameSortKey,
301-
# Directory where function granular galleries are stored
302-
"backreferences_dir": None,
303-
# Modules for which function level galleries are created. In
304-
"doc_module": "ansys-pyaedt",
305-
"image_scrapers": ("pyvista", "matplotlib"),
306-
"ignore_pattern": r"flycheck.*",
307-
"thumbnail_size": (350, 350),
308-
}
309-
if not use_gif:
310-
gif_ignore_pattern = r"|.*Maxwell2D_Transient\.py|.*Maxwell2D_DCConduction\.py|.*Hfss_Icepak_Coupling\.py|.*SBR_Time_Plot\.py"
311-
sphinx_gallery_conf["ignore_pattern"] = sphinx_gallery_conf["ignore_pattern"] + gif_ignore_pattern
279+
# if run_examples:
280+
# import pyvista
281+
282+
# # PyVista settings
283+
284+
# # Ensure that offscreen rendering is used for docs generation
285+
# pyvista.OFF_SCREEN = True
286+
# # Save figures in specified directory
287+
# pyvista.FIGURE_PATH = os.path.join(os.path.abspath("./images/"), "auto-generated/")
288+
# if not os.path.exists(pyvista.FIGURE_PATH):
289+
# os.makedirs(pyvista.FIGURE_PATH)
290+
# # Necessary for pyvista when building the sphinx gallery
291+
# pyvista.BUILDING_GALLERY = True
292+
293+
# # Manage errors
294+
# pyvista.set_error_output_file("errors.txt")
295+
# # Must be less than or equal to the XVFB window size
296+
# pyvista.global_theme["window_size"] = np.array([1024, 768])
297+
298+
# # suppress annoying matplotlib bug
299+
# warnings.filterwarnings(
300+
# "ignore",
301+
# category=UserWarning,
302+
# message="Matplotlib is currently using agg, which is a non-GUI backend, so it cannot show the figure.",
303+
# )
304+
305+
# extensions.append("sphinx_gallery.gen_gallery")
306+
# sphinx_gallery_conf = {
307+
# # convert rst to md for ipynb
308+
# "pypandoc": True,
309+
# # path to your examples scripts
310+
# "examples_dirs": ["../../examples/"],
311+
# # path where to save gallery generated examples
312+
# "gallery_dirs": ["examples"],
313+
# # Pattern to search for examples files
314+
# "filename_pattern": r"\.py",
315+
# # Remove the "Download all examples" button from the top level gallery
316+
# "download_all_examples": False,
317+
# # Sort gallery examples by file name instead of number of lines (default)
318+
# "within_subsection_order": FileNameSortKey,
319+
# # Directory where function granular galleries are stored
320+
# "backreferences_dir": None,
321+
# # Modules for which function level galleries are created. In
322+
# "doc_module": "ansys-pyaedt",
323+
# "image_scrapers": ("pyvista", "matplotlib"),
324+
# "ignore_pattern": r"flycheck.*",
325+
# "thumbnail_size": (350, 350),
326+
# }
327+
# if not use_gif:
328+
# gif_ignore_pattern = r"|.*Maxwell2D_Transient\.py|.*Maxwell2D_DCConduction\.py|.*Hfss_Icepak_Coupling\.py|.*SBR_Time_Plot\.py"
329+
# sphinx_gallery_conf["ignore_pattern"] = sphinx_gallery_conf["ignore_pattern"] + gif_ignore_pattern
312330

313331
# -- Options for HTML output -------------------------------------------------
314332
html_short_title = html_title = "PyAEDT"

0 commit comments

Comments
 (0)