diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e49a9db137e..7ccb7d2ecac 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -138,7 +138,7 @@ jobs: run: pip list - name: "Build HTML Documentation" - shell: cmd + shell: cmd /D /E:ON /V:OFF /C "CALL "{0}"" working-directory: .ci run: | build_doc.bat > ..\doc\log.txt && type ..\doc\log.txt 2>&1 diff --git a/doc/source/conf.py b/doc/source/conf.py index 05169d63637..2c18f594bfc 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,4 +1,5 @@ import os +import sys from glob import glob from datetime import datetime @@ -75,7 +76,6 @@ extensions = [ "enum_tools.autoenum", "nbsphinx", - "pydata_sphinx_theme", "sphinx.ext.autosectionlabel", "sphinx.ext.autodoc", "sphinx.ext.graphviz", @@ -91,6 +91,7 @@ typehints_defaults = "comma" typehints_use_signature = True simplify_optional_unions = False +suppress_warnings = ['autosectionlabel.*'] # Intersphinx mapping intersphinx_mapping = { @@ -200,7 +201,6 @@ def reset_servers(gallery_conf, fname, when): "json_url": f"https://{cname}/versions.json", "version_match": get_version_match(__version__), }, - "navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"], "use_meilisearch": { "api_key": os.getenv("MEILISEARCH_PUBLIC_API_KEY", ""), "index_uids": { @@ -313,3 +313,13 @@ def reset_servers(gallery_conf, fname, when): # A list of files that should not be packed into the epub file. epub_exclude_files = ["search.html"] + + +def verify_meilisearch_is_active(app): + MEILISEARCH_PUBLIC_API_KEY = os.getenv("MEILISEARCH_PUBLIC_API_KEY", None) + if not MEILISEARCH_PUBLIC_API_KEY: + sys.stderr.write("Could not find MEILISEARCH_PUBLIC_API_KEY") + sys.exit(1) + +def setup(app): + app.connect("builder-inited", verify_meilisearch_is_active) diff --git a/requirements/requirements_docs.txt b/requirements/requirements_docs.txt index 079a81efabf..649d5701c10 100644 --- a/requirements/requirements_docs.txt +++ b/requirements/requirements_docs.txt @@ -1,5 +1,5 @@ -ansys_sphinx_theme==0.13.1 -enum-tools[sphinx]==0.9.0.post1 +ansys_sphinx_theme==0.13.3 +enum-tools[sphinx]==0.11.0 graphviz==0.20.1 imageio==2.28.0 imageio-ffmpeg==0.4.7 @@ -7,10 +7,10 @@ nbsphinx==0.9.3 pypandoc==1.11 pytest-sphinx==0.5.0 pyvista==0.36.1 -sphinx==5.3.0 -sphinx-autobuild==2021.3.14 -sphinx-copybutton==0.5.0 -sphinx-gallery==0.11.0 +sphinx==7.1.0 +sphinx-autobuild==2024.2.4 +sphinx-copybutton==0.5.2 +sphinx-gallery==0.15.0 sphinx-notfound-page==1.0.0 sphinx_design==0.5.0 sphinxcontrib-napoleon==0.7 diff --git a/src/ansys/dpf/core/field.py b/src/ansys/dpf/core/field.py index bedc946a403..1592bd1d51f 100644 --- a/src/ansys/dpf/core/field.py +++ b/src/ansys/dpf/core/field.py @@ -36,8 +36,8 @@ class Field(_FieldBase): ``scoping`` identifies to which entity the first ``entity data`` belongs. For more information, see the `Fields container and fields - - `_ documentation section. + `_ + documentation section. Parameters diff --git a/src/ansys/dpf/core/fields_container.py b/src/ansys/dpf/core/fields_container.py index 7be4842fb0f..c60d76665cd 100644 --- a/src/ansys/dpf/core/fields_container.py +++ b/src/ansys/dpf/core/fields_container.py @@ -24,8 +24,8 @@ class FieldsContainer(Collection): to be separated from imaginary parts (``id=1``). For more information, see the `Fields container and fields - - `_ documentation section. + `_ + documentation section. Parameters ---------- @@ -490,8 +490,8 @@ def plot(self, label_space: dict = None, **kwargs): A dictionary (LabelSpace) of labels of the :class:`FieldsContainer` with associated values to select for plotting. This is used to filter the data to plot, for example: - - if ``label_space={'time': 10}``: a single time step (mandatory for transient) - - if ``label_space={'complex': 0, 'part': 12}``: real part of complex data for a part + - if ``label_space={'time': 10}``: a single time step (mandatory for transient) + - if ``label_space={'complex': 0, 'part': 12}``: real part of complex data for a part See :func:`~fields_container.FieldsContainer.get_fields`. If None is given, it renders all fields available, which may not make sense. **kwargs: