|
1 | | -import os |
2 | | -from glob import glob |
3 | 1 | from datetime import datetime |
| 2 | +from glob import glob |
| 3 | +import os |
4 | 4 |
|
| 5 | +from ansys_sphinx_theme import ( |
| 6 | + ansys_favicon, |
| 7 | + get_version_match, |
| 8 | + pyansys_logo_dark_mode, |
| 9 | + pyansys_logo_light_mode, |
| 10 | +) |
5 | 11 | import numpy as np |
6 | 12 | import pyvista |
7 | 13 | import sphinx |
| 14 | + |
8 | 15 | from ansys.dpf.core import __version__, server, server_factory |
9 | 16 | from ansys.dpf.core.examples import get_example_required_minimum_dpf_version |
10 | | -from ansys_sphinx_theme import ansys_favicon, get_version_match, pyansys_logo_light_mode, pyansys_logo_dark_mode |
11 | 17 |
|
12 | 18 | # Manage errors |
13 | 19 | pyvista.set_error_output_file("errors.txt") |
|
62 | 68 | ignored_pattern += f"|{example_name}" |
63 | 69 | ignored_pattern += "|11-server_types.py" |
64 | 70 | ignored_pattern += "|06-distributed_stress_averaging.py" |
65 | | -# ignored_pattern += "|00-wrapping_numpy_capabilities.py" |
66 | | -# ignored_pattern += "|01-package_python_operators.py" |
67 | | -ignored_pattern += "|02-python_operators_with_dependencies.py" |
68 | 71 | ignored_pattern += r")" |
69 | 72 |
|
70 | 73 | # Autoapi ignore pattern |
|
164 | 167 |
|
165 | 168 |
|
166 | 169 | def reset_servers(gallery_conf, fname, when): |
| 170 | + import gc |
| 171 | + |
167 | 172 | import psutil |
| 173 | + |
168 | 174 | from ansys.dpf.core import server |
169 | | - import gc |
170 | 175 |
|
171 | 176 | gc.collect() |
172 | 177 | server.shutdown_all_session_servers() |
@@ -262,7 +267,7 @@ def reset_servers(gallery_conf, fname, when): |
262 | 267 |
|
263 | 268 | # Configuration for Sphinx autoapi |
264 | 269 | suppress_warnings = [ |
265 | | - "autoapi.python_import_resolution", # Todo: remove suppression of this warning in the future |
| 270 | + "autoapi.python_import_resolution", # TODO: remove suppression of this warning in the future #1967 |
266 | 271 | "design.grid", |
267 | 272 | "config.cache", |
268 | 273 | "design.fa-build", |
@@ -375,9 +380,11 @@ def reset_servers(gallery_conf, fname, when): |
375 | 380 | def close_live_servers_and_processes(app: sphinx.application.Sphinx) -> None: |
376 | 381 | # Adapted from reset_servers() function, so this can be called after |
377 | 382 | # sphinx gallery finishes execution |
| 383 | + import gc |
| 384 | + |
378 | 385 | import psutil |
| 386 | + |
379 | 387 | from ansys.dpf.core import server |
380 | | - import gc |
381 | 388 |
|
382 | 389 | gc.collect() |
383 | 390 | server.shutdown_all_session_servers() |
|
0 commit comments