diff --git a/doc/source/API/index.rst b/doc/source/API/index.rst index 923dfa7880e..ee3458a6c3f 100644 --- a/doc/source/API/index.rst +++ b/doc/source/API/index.rst @@ -75,27 +75,123 @@ Example with ``Desktop`` class implicit initialization: circuit.release_desktop() +.. .. toctree:: +.. :maxdepth: 2 + +.. Application +.. MaterialManagement +.. Primitives3D +.. Primitives2D +.. Primitive_Objects +.. Primitives3DLayout +.. PrimitivesCircuit +.. Boundaries +.. Mesh +.. Setup +.. Post +.. DesktopMessenger +.. Optimetrics +.. Variables +.. Constants +.. Configuration +.. SetupTemplates +.. CableModeling .. toctree:: - :maxdepth: 2 - - Application - MaterialManagement - Primitives3D - Primitives2D - Primitive_Objects - Primitives3DLayout - PrimitivesCircuit - Boundaries - Mesh - Setup - Post - DesktopMessenger - Optimetrics - Variables - Constants - Configuration - SetupTemplates - CableModeling + :titlesonly: + :maxdepth: 3 + + pyaedt.misc.misc + pyaedt.generic.pdf + pyaedt.modeler.cad + pyaedt.modeler.pcb + pyaedt.generic.plot + pyaedt.modules.Mesh + pyaedt.sbrplus.plot + pyaedt.workflows.q2d + pyaedt.workflows.q3d + pyaedt.generic.spisim + pyaedt.workflows.misc + pyaedt.workflows.emit + pyaedt.workflows.hfss + pyaedt.generic.settings + pyaedt.modeler.circuits + pyaedt.modules.Boundary + pyaedt.modules.Material + pyaedt.rpc.local_server + pyaedt.workflows.icepak + pyaedt.emit_core.results + pyaedt.generic.constants + pyaedt.modeler.modeler2d + pyaedt.modeler.modeler3d + pyaedt.modeler.schematic + pyaedt.modules.solutions + pyaedt.rpc.rpyc_services + pyaedt.sbrplus.hdm_utils + pyaedt.workflows.circuit + pyaedt.workflows.project + pyaedt.application.Design + pyaedt.generic.clr_module + pyaedt.generic.compliance + pyaedt.generic.filesystem + pyaedt.modeler.modelerpcb + pyaedt.modules.MeshIcepak + pyaedt.modules.SolveSetup + pyaedt.sbrplus.hdm_parser + pyaedt.emit_core.Couplings + pyaedt.generic.ibis_reader + pyaedt.modeler.calculators + pyaedt.modules.MaterialLib + pyaedt.modules.SolveSweeps + pyaedt.workflows.installer + pyaedt.workflows.maxwell2d + pyaedt.workflows.maxwell3d + pyaedt.workflows.templates + pyaedt.application.Analysis + pyaedt.generic.DataHandlers + pyaedt.generic.design_types + pyaedt.generic.LoadAEDTFile + pyaedt.modeler.advanced_cad + pyaedt.modules.LayerStackup + pyaedt.modules.Mesh3DLayout + pyaedt.workflows.mechanical + pyaedt.application.Variables + pyaedt.modules.CableModeling + pyaedt.modules.PostProcessor + pyaedt.workflows.twinbuilder + pyaedt.application.Analysis3D + pyaedt.application.JobManager + pyaedt.generic.com_parameters + pyaedt.generic.configurations + pyaedt.misc.create_remote_dir + pyaedt.modules.monitor_icepak + pyaedt.modules.SetupTemplates + pyaedt.workflows.hfss3dlayout + pyaedt.application.analysis_hf + pyaedt.generic.general_methods + pyaedt.application.aedt_objects + pyaedt.emit_core.emit_constants + pyaedt.generic.desktop_sessions + pyaedt.modules.CircuitTemplates + pyaedt.modules.DesignXPloration + pyaedt.modules.report_templates + pyaedt.generic.near_field_import + pyaedt.generic.python_optimizers + pyaedt.generic.touchstone_parser + pyaedt.modules.fields_calculator + pyaedt.application.AnalysisNexxim + pyaedt.application.AnalysisRMxprt + pyaedt.generic.report_file_parser + pyaedt.modeler.geometry_operators + pyaedt.application.Analysis3DLayout + pyaedt.application.design_solutions + pyaedt.modules.OptimetricsTemplates + pyaedt.generic.grpc_plugin_dll_class + pyaedt.modules.AdvancedPostProcessing + pyaedt.application.AnalysisTwinBuilder + pyaedt.application.AEDT_File_Management + pyaedt.application.AnalysisMaxwellCircuit + pyaedt.workflows.customize_automation_tab + pyaedt.misc.spisim_com_configuration_files diff --git a/doc/source/conf.py b/doc/source/conf.py index adcdfbfcdd0..b9cea13c8cd 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -65,6 +65,23 @@ def run(self): addnodes.desc_content('', literal) ] +from ansys_sphinx_theme import get_autoapi_templates_dir_relative_path +autoapi_type = "python" +autoapi_dirs = ["../../pyaedt"] +autoapi_root = "api" +autoapi_options = [ + "members", + "undoc-members", + "show-inheritance", + "show-module-summary", + "special-members", +] +autoapi_template_dir = get_autoapi_templates_dir_relative_path(pathlib.Path(__file__)) +autoapi_python_use_implicit_namespaces = True +autoapi_keep_files = True +autoapi_own_page_level = "class" +autoapi_add_toctree_entry = False + def autodoc_skip_member(app, what, name, obj, skip, options): try: @@ -140,6 +157,7 @@ def setup(app): # ones. extensions = [ "ansys_sphinx_theme.extension.linkcode", + "ansys_sphinx_theme.extension.autoapi", "numpydoc", "recommonmark", "sphinx.ext.autodoc", @@ -258,57 +276,57 @@ def setup(app): # gallery build requires AEDT install # if is_windows and bool(os.getenv("PYAEDT_CI_RUN_EXAMPLES", "0")): -if run_examples: - import pyvista - - # PyVista settings - - # Ensure that offscreen rendering is used for docs generation - pyvista.OFF_SCREEN = True - # Save figures in specified directory - pyvista.FIGURE_PATH = os.path.join(os.path.abspath("./images/"), "auto-generated/") - if not os.path.exists(pyvista.FIGURE_PATH): - os.makedirs(pyvista.FIGURE_PATH) - # Necessary for pyvista when building the sphinx gallery - pyvista.BUILDING_GALLERY = True - - # Manage errors - pyvista.set_error_output_file("errors.txt") - # Must be less than or equal to the XVFB window size - pyvista.global_theme["window_size"] = np.array([1024, 768]) - - # suppress annoying matplotlib bug - warnings.filterwarnings( - "ignore", - category=UserWarning, - message="Matplotlib is currently using agg, which is a non-GUI backend, so it cannot show the figure.", - ) - - extensions.append("sphinx_gallery.gen_gallery") - sphinx_gallery_conf = { - # convert rst to md for ipynb - "pypandoc": True, - # path to your examples scripts - "examples_dirs": ["../../examples/"], - # path where to save gallery generated examples - "gallery_dirs": ["examples"], - # Pattern to search for examples files - "filename_pattern": r"\.py", - # Remove the "Download all examples" button from the top level gallery - "download_all_examples": False, - # Sort gallery examples by file name instead of number of lines (default) - "within_subsection_order": FileNameSortKey, - # Directory where function granular galleries are stored - "backreferences_dir": None, - # Modules for which function level galleries are created. In - "doc_module": "ansys-pyaedt", - "image_scrapers": ("pyvista", "matplotlib"), - "ignore_pattern": r"flycheck.*", - "thumbnail_size": (350, 350), - } - if not use_gif: - gif_ignore_pattern = r"|.*Maxwell2D_Transient\.py|.*Maxwell2D_DCConduction\.py|.*Hfss_Icepak_Coupling\.py|.*SBR_Time_Plot\.py" - sphinx_gallery_conf["ignore_pattern"] = sphinx_gallery_conf["ignore_pattern"] + gif_ignore_pattern +# if run_examples: +# import pyvista + +# # PyVista settings + +# # Ensure that offscreen rendering is used for docs generation +# pyvista.OFF_SCREEN = True +# # Save figures in specified directory +# pyvista.FIGURE_PATH = os.path.join(os.path.abspath("./images/"), "auto-generated/") +# if not os.path.exists(pyvista.FIGURE_PATH): +# os.makedirs(pyvista.FIGURE_PATH) +# # Necessary for pyvista when building the sphinx gallery +# pyvista.BUILDING_GALLERY = True + +# # Manage errors +# pyvista.set_error_output_file("errors.txt") +# # Must be less than or equal to the XVFB window size +# pyvista.global_theme["window_size"] = np.array([1024, 768]) + +# # suppress annoying matplotlib bug +# warnings.filterwarnings( +# "ignore", +# category=UserWarning, +# message="Matplotlib is currently using agg, which is a non-GUI backend, so it cannot show the figure.", +# ) + +# extensions.append("sphinx_gallery.gen_gallery") +# sphinx_gallery_conf = { +# # convert rst to md for ipynb +# "pypandoc": True, +# # path to your examples scripts +# "examples_dirs": ["../../examples/"], +# # path where to save gallery generated examples +# "gallery_dirs": ["examples"], +# # Pattern to search for examples files +# "filename_pattern": r"\.py", +# # Remove the "Download all examples" button from the top level gallery +# "download_all_examples": False, +# # Sort gallery examples by file name instead of number of lines (default) +# "within_subsection_order": FileNameSortKey, +# # Directory where function granular galleries are stored +# "backreferences_dir": None, +# # Modules for which function level galleries are created. In +# "doc_module": "ansys-pyaedt", +# "image_scrapers": ("pyvista", "matplotlib"), +# "ignore_pattern": r"flycheck.*", +# "thumbnail_size": (350, 350), +# } +# if not use_gif: +# gif_ignore_pattern = r"|.*Maxwell2D_Transient\.py|.*Maxwell2D_DCConduction\.py|.*Hfss_Icepak_Coupling\.py|.*SBR_Time_Plot\.py" +# sphinx_gallery_conf["ignore_pattern"] = sphinx_gallery_conf["ignore_pattern"] + gif_ignore_pattern # -- Options for HTML output ------------------------------------------------- html_short_title = html_title = "PyAEDT"