Skip to content

Commit

Permalink
ci: investigations (#1401)
Browse files Browse the repository at this point in the history
* ci: investigations

* dbg: use verbose

* feat: update requirements_docs.txt

* SKIP other jobs in ci.yml

Signed-off-by: paul.profizi <[email protected]>

* SKIP examples run in doc generation in conf.py

Signed-off-by: paul.profizi <[email protected]>

* Update other sphinx requirements in requirements_docs.txt

Signed-off-by: paul.profizi <[email protected]>

* Ignore all but the first example

Signed-off-by: paul.profizi <[email protected]>

* Fix link in Field docstring

Signed-off-by: paul.profizi <[email protected]>

* Fix link in FieldsContainer docstring

Signed-off-by: paul.profizi <[email protected]>

* Suppress autosectionlabel warnings (duplicate labels)

Signed-off-by: paul.profizi <[email protected]>

* Fix FieldsContainer.plot docstring

Signed-off-by: paul.profizi <[email protected]>

* debug: revert th requirement test

* debug: fix with sphinx version

* debug: fix with sphinx version

* debug: change the nav end from doc

* debug: change pydata sphinx theme

* fix: requirement

* Revert "Ignore all but the first example"

This reverts commit b1468cd.

* Revert "SKIP examples run in doc generation in conf.py"

This reverts commit dd0ab5d.

* Revert "SKIP other jobs in ci.yml"

This reverts commit 270b35e.

---------

Signed-off-by: paul.profizi <[email protected]>
Co-authored-by: Revathy Venugopal <[email protected]>
Co-authored-by: paul.profizi <[email protected]>
Co-authored-by: Revathyvenugopal162 <[email protected]>
  • Loading branch information
4 people authored Feb 16, 2024
1 parent 9e3f3f1 commit af82843
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 12 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys
from glob import glob
from datetime import datetime

Expand Down Expand Up @@ -75,7 +76,6 @@
extensions = [
"enum_tools.autoenum",
"nbsphinx",
"pydata_sphinx_theme",
"sphinx.ext.autosectionlabel",
"sphinx.ext.autodoc",
"sphinx.ext.graphviz",
Expand All @@ -91,6 +91,7 @@
typehints_defaults = "comma"
typehints_use_signature = True
simplify_optional_unions = False
suppress_warnings = ['autosectionlabel.*']

# Intersphinx mapping
intersphinx_mapping = {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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)
12 changes: 6 additions & 6 deletions requirements/requirements_docs.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
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
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
4 changes: 2 additions & 2 deletions src/ansys/dpf/core/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
<https://dpf.docs.pyansys.com/user_guide/fields_container.html#ref-user-guide-fields-container>
`_ documentation section.
<https://dpf.docs.pyansys.com/version/stable/user_guide/fields_container.html>`_
documentation section.
Parameters
Expand Down
8 changes: 4 additions & 4 deletions src/ansys/dpf/core/fields_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class FieldsContainer(Collection):
to be separated from imaginary parts (``id=1``).
For more information, see the `Fields container and fields
<https://dpf.docs.pyansys.com/user_guide/fields_container.html#ref-user-guide-fields-container>
`_ documentation section.
<https://dpf.docs.pyansys.com/version/stable/user_guide/fields_container.html>`_
documentation section.
Parameters
----------
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit af82843

Please sign in to comment.