1
- import os
2
- import sys
3
- from glob import glob
4
1
from datetime import datetime
2
+ from glob import glob
3
+ import os
5
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
+ )
6
11
import numpy as np
7
12
import pyvista
13
+
8
14
from ansys .dpf .core import __version__ , server , server_factory
9
15
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
16
12
17
# Manage errors
13
18
pyvista .set_error_output_file ("errors.txt" )
161
166
162
167
163
168
def reset_servers (gallery_conf , fname , when ):
169
+ import gc
170
+
164
171
import psutil
172
+
165
173
from ansys .dpf .core import server
166
- import gc
167
174
168
175
gc .collect ()
169
176
server .shutdown_all_session_servers ()
@@ -174,7 +181,7 @@ def reset_servers(gallery_conf, fname, when):
174
181
try :
175
182
# check whether the process name matches
176
183
if proc_name in proc .name ():
177
- # proc.kill()
184
+ proc .kill ()
178
185
nb_procs += 1
179
186
except psutil .NoSuchProcess :
180
187
pass
@@ -259,7 +266,7 @@ def reset_servers(gallery_conf, fname, when):
259
266
260
267
# Configuration for Sphinx autoapi
261
268
suppress_warnings = [
262
- "autoapi.python_import_resolution" , # Todo : remove suppression of this warning in the future
269
+ "autoapi.python_import_resolution" , # TODO : remove suppression of this warning in the future #1967
263
270
"design.grid" ,
264
271
"config.cache" ,
265
272
"design.fa-build" ,
@@ -366,4 +373,4 @@ def reset_servers(gallery_conf, fname, when):
366
373
# epub_uid = ''
367
374
368
375
# A list of files that should not be packed into the epub file.
369
- epub_exclude_files = ["search.html" ]
376
+ epub_exclude_files = ["search.html" ]
0 commit comments