Skip to content

Commit af82843

Browse files
jorgepilotoRevathyvenugopal162PProfizi
authored
ci: investigations (#1401)
* 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]>
1 parent 9e3f3f1 commit af82843

File tree

5 files changed

+25
-15
lines changed

5 files changed

+25
-15
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ jobs:
138138
run: pip list
139139

140140
- name: "Build HTML Documentation"
141-
shell: cmd
141+
shell: cmd /D /E:ON /V:OFF /C "CALL "{0}""
142142
working-directory: .ci
143143
run: |
144144
build_doc.bat > ..\doc\log.txt && type ..\doc\log.txt 2>&1

doc/source/conf.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import sys
23
from glob import glob
34
from datetime import datetime
45

@@ -75,7 +76,6 @@
7576
extensions = [
7677
"enum_tools.autoenum",
7778
"nbsphinx",
78-
"pydata_sphinx_theme",
7979
"sphinx.ext.autosectionlabel",
8080
"sphinx.ext.autodoc",
8181
"sphinx.ext.graphviz",
@@ -91,6 +91,7 @@
9191
typehints_defaults = "comma"
9292
typehints_use_signature = True
9393
simplify_optional_unions = False
94+
suppress_warnings = ['autosectionlabel.*']
9495

9596
# Intersphinx mapping
9697
intersphinx_mapping = {
@@ -200,7 +201,6 @@ def reset_servers(gallery_conf, fname, when):
200201
"json_url": f"https://{cname}/versions.json",
201202
"version_match": get_version_match(__version__),
202203
},
203-
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
204204
"use_meilisearch": {
205205
"api_key": os.getenv("MEILISEARCH_PUBLIC_API_KEY", ""),
206206
"index_uids": {
@@ -313,3 +313,13 @@ def reset_servers(gallery_conf, fname, when):
313313

314314
# A list of files that should not be packed into the epub file.
315315
epub_exclude_files = ["search.html"]
316+
317+
318+
def verify_meilisearch_is_active(app):
319+
MEILISEARCH_PUBLIC_API_KEY = os.getenv("MEILISEARCH_PUBLIC_API_KEY", None)
320+
if not MEILISEARCH_PUBLIC_API_KEY:
321+
sys.stderr.write("Could not find MEILISEARCH_PUBLIC_API_KEY")
322+
sys.exit(1)
323+
324+
def setup(app):
325+
app.connect("builder-inited", verify_meilisearch_is_active)

requirements/requirements_docs.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
ansys_sphinx_theme==0.13.1
2-
enum-tools[sphinx]==0.9.0.post1
1+
ansys_sphinx_theme==0.13.3
2+
enum-tools[sphinx]==0.11.0
33
graphviz==0.20.1
44
imageio==2.28.0
55
imageio-ffmpeg==0.4.7
66
nbsphinx==0.9.3
77
pypandoc==1.11
88
pytest-sphinx==0.5.0
99
pyvista==0.36.1
10-
sphinx==5.3.0
11-
sphinx-autobuild==2021.3.14
12-
sphinx-copybutton==0.5.0
13-
sphinx-gallery==0.11.0
10+
sphinx==7.1.0
11+
sphinx-autobuild==2024.2.4
12+
sphinx-copybutton==0.5.2
13+
sphinx-gallery==0.15.0
1414
sphinx-notfound-page==1.0.0
1515
sphinx_design==0.5.0
1616
sphinxcontrib-napoleon==0.7

src/ansys/dpf/core/field.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class Field(_FieldBase):
3636
``scoping`` identifies to which entity the first ``entity data`` belongs.
3737
3838
For more information, see the `Fields container and fields
39-
<https://dpf.docs.pyansys.com/user_guide/fields_container.html#ref-user-guide-fields-container>
40-
`_ documentation section.
39+
<https://dpf.docs.pyansys.com/version/stable/user_guide/fields_container.html>`_
40+
documentation section.
4141
4242
4343
Parameters

src/ansys/dpf/core/fields_container.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class FieldsContainer(Collection):
2424
to be separated from imaginary parts (``id=1``).
2525
2626
For more information, see the `Fields container and fields
27-
<https://dpf.docs.pyansys.com/user_guide/fields_container.html#ref-user-guide-fields-container>
28-
`_ documentation section.
27+
<https://dpf.docs.pyansys.com/version/stable/user_guide/fields_container.html>`_
28+
documentation section.
2929
3030
Parameters
3131
----------
@@ -490,8 +490,8 @@ def plot(self, label_space: dict = None, **kwargs):
490490
A dictionary (LabelSpace) of labels of the :class:`FieldsContainer` with associated
491491
values to select for plotting.
492492
This is used to filter the data to plot, for example:
493-
- if ``label_space={'time': 10}``: a single time step (mandatory for transient)
494-
- if ``label_space={'complex': 0, 'part': 12}``: real part of complex data for a part
493+
- if ``label_space={'time': 10}``: a single time step (mandatory for transient)
494+
- if ``label_space={'complex': 0, 'part': 12}``: real part of complex data for a part
495495
See :func:`~fields_container.FieldsContainer.get_fields`.
496496
If None is given, it renders all fields available, which may not make sense.
497497
**kwargs:

0 commit comments

Comments
 (0)