Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7c9ac45
Bump sphinx from 7.1.0 to 8.1.3 in /requirements
dependabot[bot] Nov 25, 2024
760422d
Merge branch 'master' into dependabot/pip/requirements/sphinx-8.1.3
PProfizi Nov 25, 2024
880f470
Merge branch 'master' into dependabot/pip/requirements/sphinx-8.1.3
jorgepiloto Nov 29, 2024
b94f916
Merge branch 'master' into dependabot/pip/requirements/sphinx-8.1.3
PProfizi Nov 29, 2024
7fc9b54
Merge branch 'master' into dependabot/pip/requirements/sphinx-8.1.3
jorgepiloto Dec 2, 2024
0d3b3c7
ci: add tox.ini file
jorgepiloto Dec 2, 2024
8169bc5
fix: tox.ini syntax and gitignore
jorgepiloto Dec 2, 2024
0ed9e80
fix: ignoring failing files results in successful doc build.
moe-ad Dec 2, 2024
85dda6e
docs: added some hooks for troubleshooting the issue
moe-ad Dec 2, 2024
bbe1c69
fix: updated server and process closing logic after sphinx-gallery ex…
moe-ad Dec 3, 2024
2373a6f
fix: modified function checking server closure after sphinx gallery e…
moe-ad Dec 11, 2024
902df6c
fix: added ipykernel to address 'No python3 ...' error
moe-ad Dec 12, 2024
9bb195f
fix: build issues
RobPasMue Feb 10, 2025
23d005d
Merge branch 'master' into dependabot/pip/requirements/sphinx-8.1.3
RobPasMue Feb 10, 2025
e548f07
Update requirements/requirements_docs.txt
RobPasMue Feb 10, 2025
f5ac3a1
fix: activate failing example
moe-ad Feb 11, 2025
7be59da
Merge branch 'master' into dependabot/pip/requirements/sphinx-8.1.3
moe-ad Feb 12, 2025
5c8a090
fix: remove reset servers logic
moe-ad Feb 17, 2025
a79f2f0
Merge branch 'master' into dependabot/pip/requirements/sphinx-8.1.3
moe-ad Feb 17, 2025
3e59582
Merge branch 'master' into dependabot/pip/requirements/sphinx-8.1.3
moe-ad Feb 19, 2025
b7e1958
Merge branch 'master' into dependabot/pip/requirements/sphinx-8.1.3
moe-ad Feb 19, 2025
ce27e92
Merge branch 'master' into dependabot/pip/requirements/sphinx-8.1.3
moe-ad Feb 20, 2025
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,8 @@ src/ansys/grpc/

# C extensions
*.so

# Ignore auto-generated API reference
doc/source/api
doc/source/examples
doc/source/images/auto-generated
41 changes: 39 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os
import sys
from glob import glob
from datetime import datetime

import numpy as np
import pyvista
import sphinx
from ansys.dpf.core import __version__, server, server_factory
from ansys.dpf.core.examples import get_example_required_minimum_dpf_version
from ansys_sphinx_theme import ansys_favicon, get_version_match, pyansys_logo_light_mode, pyansys_logo_dark_mode
Expand Down Expand Up @@ -62,6 +62,9 @@
ignored_pattern += f"|{example_name}"
ignored_pattern += "|11-server_types.py"
ignored_pattern += "|06-distributed_stress_averaging.py"
# ignored_pattern += "|00-wrapping_numpy_capabilities.py"
# ignored_pattern += "|01-package_python_operators.py"
ignored_pattern += "|02-python_operators_with_dependencies.py"
ignored_pattern += r")"

# Autoapi ignore pattern
Expand Down Expand Up @@ -174,7 +177,7 @@ def reset_servers(gallery_conf, fname, when):
try:
# check whether the process name matches
if proc_name in proc.name():
# proc.kill()
proc.kill()
nb_procs += 1
except psutil.NoSuchProcess:
pass
Expand Down Expand Up @@ -367,3 +370,37 @@ 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 close_live_servers_and_processes(app: sphinx.application.Sphinx) -> None:
# Adapted from reset_servers() function, so this can be called after
# sphinx gallery finishes execution
import psutil
from ansys.dpf.core import server
import gc

gc.collect()
server.shutdown_all_session_servers()

proc_name = "Ans.Dpf.Grpc"
nb_procs = 0
for proc in psutil.process_iter():
try:
# check whether the process name matches
if proc_name in proc.name():
proc.kill()
nb_procs += 1
except psutil.NoSuchProcess:
pass

def setup(app: sphinx.application.Sphinx) -> None:
"""
Run hook function(s) during the documentation build.

Parameters
----------
app : sphinx.application.Sphinx
Sphinx application instance containing the all the doc build configuration.
"""

app.connect("builder-inited", close_live_servers_and_processes)
4 changes: 2 additions & 2 deletions requirements/requirements_docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ enum-tools[sphinx]==0.12.0
graphviz==0.20.1
imageio==2.36.0
imageio-ffmpeg==0.5.1
nbsphinx==0.9.6
nbsphinx==0.9.5
pypandoc==1.14
pytest-sphinx==0.6.3
pyvista==0.44.2
sphinx==7.4.7
sphinx==8.1.3
sphinx-copybutton==0.5.2
sphinx-gallery==0.18.0
sphinx-notfound-page==1.0.4
Expand Down
Loading