8
8
from pathlib import Path
9
9
from pprint import pformat
10
10
from docutils .nodes import document
11
-
12
- # import re
13
11
import shutil
14
12
from typing import Any
15
13
from sphinx .application import Sphinx
16
- import sys
17
- import warnings
18
14
19
- # from sphinx_gallery.sorting import FileNameSortKey
20
15
from ansys_sphinx_theme import (
21
16
ansys_favicon ,
22
17
ansys_logo_white ,
23
18
ansys_logo_white_cropped ,
24
- # get_version_match,
25
19
latex ,
26
20
pyansys_logo_black ,
27
21
watermark ,
51
45
cname = os .getenv ("DOCUMENTATION_CNAME" , "nocname.com" )
52
46
release = version = "0.1.dev0"
53
47
54
- # os.environ["PYAEDT_NON_GRAPHICAL"] = "1"
55
- # os.environ["PYAEDT_DOC_GENERATION"] = "1"
56
-
57
48
# -- Connect functions (hooks) to Sphinx events -----------------------------
58
49
59
50
class PrettyPrintDirective (Directive ):
@@ -343,20 +334,6 @@ def setup(app):
343
334
# separating the parameter name and type",
344
335
}
345
336
346
- # numpydoc_validation_exclude = { # set of regex
347
- # r"\.AEDTMessageManager.add_message$", # bad SS05
348
- # r"\.Modeler3D\.create_choke$", # bad RT05
349
- # r"HistoryProps.", # bad RT05 because of the base class named OrderedDict
350
- # }
351
-
352
- # # Add any paths that contain templates here, relative to this directory.
353
- # templates_path = ["_templates"]
354
-
355
- # # disable generating the sphinx nested documentation
356
- # if "PYAEDT_CI_NO_AUTODOC" in os.environ:
357
- # templates_path.clear()
358
-
359
-
360
337
# Copy button customization ---------------------------------------------------
361
338
# exclude traditional Python prompts from the copied code
362
339
copybutton_prompt_text = r">>> ?|\.\.\. "
@@ -370,21 +347,9 @@ def setup(app):
370
347
# directories to ignore when looking for source files.
371
348
# This pattern also affects html_static_path and html_extra_path.
372
349
exclude_patterns = [
373
- # "_build",
374
- # "sphinx_boogergreen_theme_1",
375
- # "Thumbs.db",
376
- # ".DS_Store",
377
- # "*.txt",
378
350
"conf.py" ,
379
- # "constants.py",
380
351
]
381
352
382
- # inheritance_graph_attrs = dict(rankdir="RL", size='"8.0, 10.0"', fontsize=14, ratio="compress")
383
- # inheritance_node_attrs = dict(
384
- # shape="ellipse", fontsize=14, height=0.75, color="dodgerblue1", style="filled"
385
- # )
386
-
387
-
388
353
# -- Options for HTML output -------------------------------------------------
389
354
390
355
source_suffix = {".rst" : "restructuredtext" , ".md" : "markdown" }
@@ -410,47 +375,15 @@ def setup(app):
410
375
}
411
376
412
377
# Pyvista customization
413
- # pyvista.set_error_output_file("errors.txt")
414
- # Ensure that offscreen rendering is used for docs generation
415
- # pyvista.OFF_SCREEN = True
416
- # Preferred plotting style for documentation
417
- # pyvista.set_plot_theme('document')
418
- # must be less than or equal to the XVFB window size
378
+
379
+ # Must be less than or equal to the XVFB window size
419
380
pyvista .global_theme ["window_size" ] = np .array ([1024 , 768 ])
420
381
421
382
# Save figures in specified directory
422
383
pyvista .FIGURE_PATH = os .path .join (os .path .abspath ("./images/" ), "auto-generated/" )
423
384
if not os .path .exists (pyvista .FIGURE_PATH ):
424
385
os .makedirs (pyvista .FIGURE_PATH )
425
386
426
- # # suppress annoying matplotlib bug
427
- # warnings.filterwarnings(
428
- # "ignore",
429
- # category=UserWarning,
430
- # message="Matplotlib is currently using agg so figures are not shown.",
431
- # )
432
-
433
- # necessary for pyvista when building the sphinx gallery
434
- # pyvista.BUILDING_GALLERY = True
435
-
436
- # jinja_contexts = {
437
- # "main_toctree": {
438
- # "run_examples": config["run_examples"],
439
- # },
440
- # }
441
- # def prepare_jinja_env(jinja_env) -> None:
442
- # """
443
- # Customize the jinja env.
444
- #
445
- # Notes
446
- # -----
447
- # See https://jinja.palletsprojects.com/en/3.0.x/api/#jinja2.Environment
448
- # """
449
- # jinja_env.globals["project_name"] = project
450
- #
451
- #
452
- # autoapi_prepare_jinja_env = prepare_jinja_env
453
-
454
387
# -- Options for HTML output -------------------------------------------------
455
388
html_short_title = html_title = "PyAEDT Examples"
456
389
html_theme = "ansys_sphinx_theme"
0 commit comments