diff --git a/.gitignore b/.gitignore index a950366a84e..73e06fe5bf9 100644 --- a/.gitignore +++ b/.gitignore @@ -357,6 +357,7 @@ venv.bak/ # sphinx build doc/_build/ doc/source/examples +doc/source/api_full doc/build_errors.txt _autosummary/ diff --git a/doc/Makefile b/doc/Makefile old mode 100644 new mode 100755 index a1265bd3bcb..d208c9ffd97 --- a/doc/Makefile +++ b/doc/Makefile @@ -10,6 +10,9 @@ BUILDDIR = _build LINKCHECKDIR = $(BUILDDIR)/linkcheck LINKCHECKOPTS = -d $(BUILDDIR)/.doctrees -W --keep-going --color +# Skip building the cheat sheet +SKIP_BUILD_CHEAT_SHEET = False + # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/doc/changelog.d/6800.added.md b/doc/changelog.d/6800.added.md new file mode 100644 index 00000000000..d4f1feacb43 --- /dev/null +++ b/doc/changelog.d/6800.added.md @@ -0,0 +1 @@ +Added autoapi integration diff --git a/doc/make.bat b/doc/make.bat index 759ea3346c3..9723349426c 100644 --- a/doc/make.bat +++ b/doc/make.bat @@ -15,6 +15,9 @@ set BUILDDIR=_build set LINKCHECKDIR=\%BUILDDIR%\linkcheck set LINKCHECKOPTS=-d %BUILDDIR%\.doctrees -W --keep-going --color +::Skip building the cheat sheet +set SKIP_BUILD_CHEAT_SHEET=False + REM This LOCs are used to uninstall and install specific package(s) during CI/CD for /f %%i in ('pip freeze ^| findstr /c:"vtk-osmesa"') do set is_vtk_osmesa_installed=%%i if NOT "%is_vtk_osmesa_installed%" == "vtk-osmesa" if "%ON_CI%" == "True" ( diff --git a/doc/source/API/index.rst b/doc/source/API/index.rst index 15133c31360..494304539f3 100644 --- a/doc/source/API/index.rst +++ b/doc/source/API/index.rst @@ -15,6 +15,10 @@ and Mechanical solvers for comprehensive multiphysics analysis. Tight integration among these solutions provides unprecedented ease of use for setup and faster resolution of complex simulations for design and optimization. +.. note:: + For the complete API reference and additional documentation, please visit: + :doc:`../api_full/ansys/aedt/core/index` + .. image:: ../Resources/aedt_2.png :width: 800 :alt: AEDT Applications diff --git a/doc/source/conf.py b/doc/source/conf.py index a461a6c2a53..8c6e20a0366 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -151,6 +151,7 @@ def setup(app): "sphinx.ext.todo", "sphinx_copybutton", "sphinx_design", + "ansys_sphinx_theme.extension.autoapi", ] # Intersphinx mapping @@ -303,8 +304,17 @@ def setup(app): "file": "cheatsheet/cheat_sheet.qmd", "title": "PyAEDT cheat sheet", }, + "ansys_sphinx_theme_autoapi": { + "project": "PyAEDT", + "output": "api_full" + } } + +# Determine whether to skip cheat sheet build or not +if os.environ.get("SKIP_BUILD_CHEAT_SHEET"): + html_theme_options.pop("cheatsheet") + # # Add button to download PDF # html_theme_options["icon_links"].append( # { diff --git a/pyproject.toml b/pyproject.toml index fbc6ea804ff..d05435e432c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ dotnet = [ "pywin32>=303; platform_system=='Windows'", ] doc = [ - "ansys-sphinx-theme>=1.0.0,<1.7", + "ansys-sphinx-theme[autoapi]>=1.0.0,<1.7", "jupyter", "numpydoc>=1.5.0,<1.9", "recommonmark",