Skip to content

Commit 7f43ae2

Browse files
committed
REFACT: Cleanup doc config file
1 parent 641334a commit 7f43ae2

File tree

1 file changed

+2
-69
lines changed

1 file changed

+2
-69
lines changed

doc/source/conf.py

+2-69
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,14 @@
88
from pathlib import Path
99
from pprint import pformat
1010
from docutils.nodes import document
11-
12-
# import re
1311
import shutil
1412
from typing import Any
1513
from sphinx.application import Sphinx
16-
import sys
17-
import warnings
1814

19-
# from sphinx_gallery.sorting import FileNameSortKey
2015
from ansys_sphinx_theme import (
2116
ansys_favicon,
2217
ansys_logo_white,
2318
ansys_logo_white_cropped,
24-
# get_version_match,
2519
latex,
2620
pyansys_logo_black,
2721
watermark,
@@ -51,9 +45,6 @@
5145
cname = os.getenv("DOCUMENTATION_CNAME", "nocname.com")
5246
release = version = "0.1.dev0"
5347

54-
# os.environ["PYAEDT_NON_GRAPHICAL"] = "1"
55-
# os.environ["PYAEDT_DOC_GENERATION"] = "1"
56-
5748
# -- Connect functions (hooks) to Sphinx events -----------------------------
5849

5950
class PrettyPrintDirective(Directive):
@@ -343,20 +334,6 @@ def setup(app):
343334
# separating the parameter name and type",
344335
}
345336

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-
360337
# Copy button customization ---------------------------------------------------
361338
# exclude traditional Python prompts from the copied code
362339
copybutton_prompt_text = r">>> ?|\.\.\. "
@@ -370,21 +347,9 @@ def setup(app):
370347
# directories to ignore when looking for source files.
371348
# This pattern also affects html_static_path and html_extra_path.
372349
exclude_patterns = [
373-
# "_build",
374-
# "sphinx_boogergreen_theme_1",
375-
# "Thumbs.db",
376-
# ".DS_Store",
377-
# "*.txt",
378350
"conf.py",
379-
# "constants.py",
380351
]
381352

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-
388353
# -- Options for HTML output -------------------------------------------------
389354

390355
source_suffix = {".rst": "restructuredtext", ".md": "markdown"}
@@ -410,47 +375,15 @@ def setup(app):
410375
}
411376

412377
# 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
419380
pyvista.global_theme["window_size"] = np.array([1024, 768])
420381

421382
# Save figures in specified directory
422383
pyvista.FIGURE_PATH = os.path.join(os.path.abspath("./images/"), "auto-generated/")
423384
if not os.path.exists(pyvista.FIGURE_PATH):
424385
os.makedirs(pyvista.FIGURE_PATH)
425386

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-
454387
# -- Options for HTML output -------------------------------------------------
455388
html_short_title = html_title = "PyAEDT Examples"
456389
html_theme = "ansys_sphinx_theme"

0 commit comments

Comments
 (0)