-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
conf.py
117 lines (103 loc) · 3.87 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
"""
Configuration file for the Sphinx documentation builder.
"""
import os
from datetime import datetime
from packaging.version import Version
from sunpy_sphinx_theme.conf import * # NOQA
from sunkit_pyvista import __version__
# -- Project information -----------------------------------------------------
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
os.environ["HIDE_PARFIVE_PROGESS"] = "True"
os.environ["PYDEVD_DISABLE_FILE_VALIDATION"] = "1"
project = "sunkit-pyvista"
author = "SunPy Community"
copyright = "{}, {}".format(datetime.now().year, author)
# The full version, including alpha/beta/rc tags
release = __version__
sunkit_pyvista_version = Version(__version__)
is_release = not (
sunkit_pyvista_version.is_prerelease or sunkit_pyvista_version.is_devrelease
)
# -- General configuration ---------------------------------------------------
extensions = [
"sphinx_automodapi.automodapi",
"sphinx_automodapi.smart_resolver",
"sphinx_changelog",
"sphinx_gallery.gen_gallery",
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.doctest",
"sphinx.ext.inheritance_diagram",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
]
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
source_suffix = ".rst"
# The master toctree document.
master_doc = "index"
# Enable nitpicky mode, which forces links to be non-broken
nitpicky = True
# This is not used. See docs/nitpick-exceptions file for the actual listing.
nitpick_ignore = []
for line in open("nitpick-exceptions"):
if line.strip() == "" or line.startswith("#"):
continue
dtype, target = line.split(None, 1)
target = target.strip()
nitpick_ignore.append((dtype, target))
# -- Options for intersphinx extension ---------------------------------------
intersphinx_mapping = {
"python": (
"https://docs.python.org/3/",
(None, "http://www.astropy.org/astropy-data/intersphinx/python3.inv"),
),
"numpy": (
"https://numpy.org/doc/stable/",
(None, "http://www.astropy.org/astropy-data/intersphinx/numpy.inv"),
),
"matplotlib": (
"https://matplotlib.org/",
(None, "http://www.astropy.org/astropy-data/intersphinx/matplotlib.inv"),
),
"astropy": ("https://docs.astropy.org/en/stable/", None),
"sunpy": ("https://docs.sunpy.org/en/stable", None),
"pyvista": ("https://docs.pyvista.org/", None),
}
# -- pyvista configuration ---------------------------------------------------
import pyvista
# Preferred plotting style for documentation
pyvista.set_plot_theme("document")
pyvista.global_theme.window_size = [512, 512]
pyvista.global_theme.font.size = 18
pyvista.global_theme.font.label_size = 18
pyvista.global_theme.font.title_size = 18
pyvista.global_theme.return_cpos = False
# Necessary when building the sphinx gallery
pyvista.OFF_SCREEN = True
pyvista.BUILDING_GALLERY = True
pyvista.set_jupyter_backend(None)
# -- Sphinx Gallery ------------------------------------------------------------
sphinx_gallery_conf = {
"backreferences_dir": os.path.join("generated", "modules"),
"filename_pattern": "^((?!skip_).)*$",
"examples_dirs": os.path.join("..", "examples"),
"gallery_dirs": os.path.join("generated", "gallery"),
"matplotlib_animations": True,
# Comes from the theme.
"default_thumb_file": png_icon, # NOQA
"abort_on_example_error": False,
"plot_gallery": "True",
"remove_config_comments": True,
"doc_module": ("sunpy"),
"only_warn_on_example_error": True,
"image_scrapers": ("matplotlib", "pyvista"),
}