Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation search engine #1401

Merged
merged 23 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
991b626
ci: investigations
jorgepiloto Feb 6, 2024
1be0e77
dbg: use verbose
jorgepiloto Feb 6, 2024
9736bc7
feat: update requirements_docs.txt
jorgepiloto Feb 6, 2024
e4cb58d
Merge branch 'master' into fix/meilisearch
jorgepiloto Feb 12, 2024
a759912
Merge branch 'master' into fix/meilisearch
Revathyvenugopal162 Feb 15, 2024
270b35e
SKIP other jobs in ci.yml
PProfizi Feb 15, 2024
dd0ab5d
SKIP examples run in doc generation in conf.py
PProfizi Feb 15, 2024
fcafdc0
Update other sphinx requirements in requirements_docs.txt
PProfizi Feb 15, 2024
b1468cd
Ignore all but the first example
PProfizi Feb 15, 2024
2c81cd1
Fix link in Field docstring
PProfizi Feb 15, 2024
ac49c3e
Fix link in FieldsContainer docstring
PProfizi Feb 15, 2024
4e2cf21
Suppress autosectionlabel warnings (duplicate labels)
PProfizi Feb 15, 2024
2858bc2
Fix FieldsContainer.plot docstring
PProfizi Feb 15, 2024
e67fb07
Merge branch 'master' into fix/meilisearch
Revathyvenugopal162 Feb 16, 2024
855d242
debug: revert th requirement test
Revathyvenugopal162 Feb 16, 2024
576a745
debug: fix with sphinx version
Revathyvenugopal162 Feb 16, 2024
362ad1a
debug: fix with sphinx version
Revathyvenugopal162 Feb 16, 2024
464706e
debug: change the nav end from doc
Revathyvenugopal162 Feb 16, 2024
4dcc08c
debug: change pydata sphinx theme
Revathyvenugopal162 Feb 16, 2024
9c0529c
fix: requirement
Revathyvenugopal162 Feb 16, 2024
f785f58
Revert "Ignore all but the first example"
PProfizi Feb 16, 2024
2d3d345
Revert "SKIP examples run in doc generation in conf.py"
PProfizi Feb 16, 2024
dfe7995
Revert "SKIP other jobs in ci.yml"
PProfizi Feb 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading