diff --git a/.ci/build_doc.bat b/.ci/build_doc.bat deleted file mode 100644 index f5a447971d..0000000000 --- a/.ci/build_doc.bat +++ /dev/null @@ -1,28 +0,0 @@ -set SPHINX_APIDOC_OPTIONS=inherited-members -call sphinx-apidoc -o ../doc/source/api ../src/ansys ../src/ansys/dpf/core/log.py ^ -../src/ansys/dpf/core/help.py ../src/ansys/dpf/core/mapping_types.py ../src/ansys/dpf/core/ipconfig.py ^ -../src/ansys/dpf/core/field_base.py ../src/ansys/dpf/core/cache.py ../src/ansys/dpf/core/misc.py ^ -../src/ansys/dpf/core/check_version.py ../src/ansys/dpf/core/operators/build.py ../src/ansys/dpf/core/operators/specification.py ^ -../src/ansys/dpf/core/vtk_helper.py ../src/ansys/dpf/core/label_space.py ../src/ansys/dpf/core/examples/python_plugins/* ^ -../src/ansys/dpf/core/examples/examples.py ../src/ansys/dpf/gate/* ../src/ansys/dpf/gatebin/* ../src/ansys/grpc/dpf/* ^ - ../src/ansys/dpf/core/property_fields_container.py ^ - -f --implicit-namespaces --separate --no-headings -pushd . -cd ../doc/ -call make clean -call make html -v -v -v -P - -dir - -rem Patch pyVista issue with elemental plots - -xcopy source\examples\04-advanced\02-volume_averaged_stress\sphx_glr_02-volume_averaged_stress_001.png build\html\_images\ /y /f -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_001.png build\html\_images\ /y /f -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_002.png build\html\_images\ /y /f -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_003.png build\html\_images\ /y /f -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_004.png build\html\_images\ /y /f -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_005.png build\html\_images\ /y /f -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_006.png build\html\_images\ /y /f -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_007.png build\html\_images\ /y /f -xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_thumb.png build\html\_images\ /y /f -popd diff --git a/doc/make.bat b/doc/make.bat index 6f2dec1e0c..39811935b7 100644 --- a/doc/make.bat +++ b/doc/make.bat @@ -9,11 +9,13 @@ if "%SPHINXBUILD%" == "" ( ) set SOURCEDIR=source set BUILDDIR=build +set AUTOAPI_OUTDIR=source\api if "%1" == "" goto help if "%1" == "clean" goto clean %SPHINXBUILD% >NUL 2>NUL + if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx @@ -34,6 +36,9 @@ echo.Cleaning files form previous build... IF EXIST "build" ( rmdir "build" /s /q ) +IF EXIST "source\api" ( + rmdir "source\api" /s /q +) IF EXIST "source\images\auto-generated" ( rmdir "source\images\auto-generated" /s /q ) diff --git a/doc/source/api/index.rst b/doc/source/api/index.rst index a5c5e07ad2..20f4f6cd54 100644 --- a/doc/source/api/index.rst +++ b/doc/source/api/index.rst @@ -4,9 +4,12 @@ API reference ============= -.. toctree:: - :maxdepth: 2 - :caption: API reference - - ansys.dpf.core +.. toctree:: + :maxdepth: 1 + :hidden: + :caption: API subpackages + + ansys.dpf.core + ansys.dpf.core.operators + ansys.dpf.core.examples diff --git a/doc/source/conf.py b/doc/source/conf.py index dcee0fc119..7d9fe51ddb 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -74,6 +74,7 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + "ansys_sphinx_theme.extension.autoapi", "sphinx.ext.autosummary", "enum_tools.autoenum", "nbsphinx", @@ -197,6 +198,9 @@ def reset_servers(gallery_conf, fname, when): html_favicon = ansys_favicon html_theme_options = { "github_url": "https://github.com/ansys/pydpf-core", + "ansys_sphinx_theme_autoapi": { + "project": project, + }, "show_prev_next": False, "show_breadcrumbs": True, "additional_breadcrumbs": [