Skip to content

Commit

Permalink
Doc/show mini gallery (#947)
Browse files Browse the repository at this point in the history
Co-authored-by: pyansys-ci-bot <[email protected]>
  • Loading branch information
waltersma and pyansys-ci-bot authored Dec 9, 2024
1 parent e66f8d7 commit a9e4fbb
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dist/
# autogenerated docs
_autosummary
_build/

_gallery_backreferences

# Testing
.coverage
Expand All @@ -49,4 +49,4 @@ test-output.xml
.vscode

# logger
.log
.log
1 change: 1 addition & 0 deletions doc/changelog.d/947.documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Doc/show mini gallery
4 changes: 2 additions & 2 deletions doc/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
if "%SPHINXOPTS%" == "" (
set SPHINXOPTS=-j auto
set SPHINXOPTS=-n -j auto
)

set SOURCEDIR=source
Expand Down Expand Up @@ -36,7 +36,7 @@ goto end

:clean
rmdir /s /q %BUILDDIR% > /NUL 2>&1
for /d /r %SOURCEDIR% %%d in (_autosummary) do @if exist "%%d" rmdir /s /q "%%d"
for /d /r %SOURCEDIR% %%d in (_autosummary,_gallery_backreferences) do @if exist "%%d" rmdir /s /q "%%d"
rmdir /s /q %SOURCEDIR%\examples\gallery_examples
rmdir /s /q %SOURCEDIR%\images\auto-generated
goto end
Expand Down
5 changes: 5 additions & 0 deletions doc/source/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@
{% endif %}
{% endblock %}

.. minigallery::
:add-heading: Examples using {{ objname }}

{{ fullname }}

.. vale on
10 changes: 10 additions & 0 deletions doc/source/_templates/autosummary/function.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{ name | escape | underline}}

.. currentmodule:: {{ module }}

.. autofunction:: {{ fullname }}

.. minigallery::
:add-heading: Examples using {{ objname }}

{{ fullname }}
10 changes: 10 additions & 0 deletions doc/source/_templates/autosummary/method.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{ name | escape | underline}}

.. currentmodule:: {{ module }}

.. automethod:: {{ fullname }}

.. minigallery::
:add-heading: Examples using {{ objname }}

{{ fullname }}
5 changes: 5 additions & 0 deletions doc/source/_templates/autosummary/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,9 @@
{% endif %}
{% endblock %}

.. minigallery::
:add-heading: Examples using {{ objname }}

{{ module }}.{{ objname }}

.. vale on
6 changes: 4 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
'sphinx.ext.autosummary',
"numpydoc",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinx_copybutton",
"sphinx_gallery.gen_gallery",
"jupyter_sphinx",
Expand Down Expand Up @@ -168,9 +169,10 @@
# Sort gallery example by file name instead of number of lines (default)
"within_subsection_order": FileNameSortKey,
# directory where function granular galleries are stored
"backreferences_dir": None,
"backreferences_dir": "api/_gallery_backreferences",
# Modules for which function level galleries are created. In
"doc_module": "ansys-meshing-prime",
"doc_module": ("ansys.meshing.prime"),
"exclude_implicit_doc": {"ansys\\.meshing\\.prime\\._.*"}, # ignore private submodules
"image_scrapers": (DynamicScraper(), "matplotlib"),
"ignore_pattern": "flycheck*",
"thumbnail_size": (350, 350),
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/launch_prime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The :func:`Client.exit() <ansys.meshing.prime.Client.exit>` method ends the conn
If the :class:`Client <ansys.meshing.prime.Client>` class launched the server, then this terminates the server process.

.. note::
If you use Intel(R) MPI Library, Version 2021.8, you may encounter the following error while exiting the client:
If you use Intel(R) MPI Library, Version 2021.8, you may encounter the following error while exiting the client:

.. figure:: ../images/client_exit_error.png
:width: 200pt
Expand Down

0 comments on commit a9e4fbb

Please sign in to comment.