|
1 |
| -import os |
2 |
| -import sys |
3 | 1 | import datetime
|
| 2 | +import os |
4 | 3 |
|
| 4 | +import numpy as np |
5 | 5 | import pymeshfix
|
6 | 6 |
|
7 | 7 | # -- pyvista configuration ---------------------------------------------------
|
8 | 8 | import pyvista
|
9 |
| -import numpy as np |
| 9 | + |
10 | 10 | # Manage errors
|
11 |
| -pyvista.set_error_output_file('errors.txt') |
| 11 | +pyvista.set_error_output_file("errors.txt") |
12 | 12 | # Ensure that offscreen rendering is used for docs generation
|
13 |
| -pyvista.OFF_SCREEN = True # Not necessary - simply an insurance policy |
| 13 | +pyvista.OFF_SCREEN = True # Not necessary - simply an insurance policy |
14 | 14 | # Preferred plotting style for documentation
|
15 |
| -pyvista.set_plot_theme('document') |
16 |
| -pyvista.rcParams['window_size'] = np.array([1024, 768]) * 2 |
| 15 | +pyvista.set_plot_theme("document") |
| 16 | +pyvista.rcParams["window_size"] = np.array([1024, 768]) * 2 |
17 | 17 | # Save figures in specified directory
|
18 |
| -pyvista.FIGURE_PATH = os.path.abspath('./images/') |
| 18 | +pyvista.FIGURE_PATH = os.path.abspath("./images/") |
19 | 19 | if not os.path.exists(pyvista.FIGURE_PATH):
|
20 | 20 | os.makedirs(pyvista.FIGURE_PATH)
|
21 | 21 |
|
22 | 22 | pyvista.BUILDING_GALLERY = True
|
23 | 23 |
|
24 | 24 | # -- Project information -----------------------------------------------------
|
25 | 25 |
|
26 |
| -project = 'pymeshfix' |
| 26 | +project = "pymeshfix" |
27 | 27 | year = datetime.date.today().year
|
28 | 28 | copyright = f"2017-{year}, The PyVista Developers"
|
29 |
| -author = 'Alex Kaszynski' |
| 29 | +author = "Alex Kaszynski" |
30 | 30 |
|
31 | 31 | # The short X.Y version
|
32 | 32 | version = release = pymeshfix.__version__
|
|
42 | 42 | # Add any Sphinx extension module names here, as strings. They can be
|
43 | 43 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
44 | 44 | # ones.
|
45 |
| -extensions = ['sphinx.ext.autodoc', |
46 |
| - 'sphinx.ext.napoleon', |
47 |
| - 'sphinx.ext.doctest', |
48 |
| - 'sphinx.ext.autosummary', |
49 |
| - 'notfound.extension', |
50 |
| - 'sphinx_copybutton', |
51 |
| - 'sphinx_gallery.gen_gallery', |
52 |
| - 'sphinx.ext.extlinks', |
53 |
| - ] |
| 45 | +extensions = [ |
| 46 | + "sphinx.ext.autodoc", |
| 47 | + "sphinx.ext.napoleon", |
| 48 | + "sphinx.ext.doctest", |
| 49 | + "sphinx.ext.autosummary", |
| 50 | + "notfound.extension", |
| 51 | + "sphinx_copybutton", |
| 52 | + "sphinx_gallery.gen_gallery", |
| 53 | + "sphinx.ext.extlinks", |
| 54 | +] |
54 | 55 |
|
55 | 56 | html_static_path = ["_static"]
|
56 | 57 |
|
57 | 58 | # Add any paths that contain templates here, relative to this directory.
|
58 |
| -templates_path = ['_templates'] |
| 59 | +templates_path = ["_templates"] |
59 | 60 |
|
60 | 61 | # The suffix(es) of source filenames.
|
61 | 62 | # You can specify multiple suffix as a list of string:
|
62 | 63 | #
|
63 | 64 | # source_suffix = ['.rst', '.md']
|
64 |
| -source_suffix = '.rst' |
| 65 | +source_suffix = ".rst" |
65 | 66 |
|
66 | 67 | # The master toctree document.
|
67 |
| -master_doc = 'index' |
| 68 | +master_doc = "index" |
68 | 69 |
|
69 | 70 | # The language for content autogenerated by Sphinx. Refer to documentation
|
70 | 71 | # for a list of supported languages.
|
|
79 | 80 | exclude_patterns = []
|
80 | 81 |
|
81 | 82 | # The name of the Pygments (syntax highlighting) style to use.
|
82 |
| -pygments_style = 'sphinx' |
| 83 | +pygments_style = "sphinx" |
83 | 84 |
|
84 | 85 | # Copy button customization ---------------------------------------------------
|
85 | 86 | # exclude traditional Python prompts from the copied code
|
86 |
| -copybutton_prompt_text = r'>>> ?|\.\.\. ' |
| 87 | +copybutton_prompt_text = r">>> ?|\.\.\. " |
87 | 88 | copybutton_prompt_is_regexp = True
|
88 | 89 |
|
89 | 90 |
|
|
95 | 96 | html_theme = "pydata_sphinx_theme"
|
96 | 97 | html_context = {
|
97 | 98 | # Enable the "Edit in GitHub link within the header of each page.
|
98 |
| - 'display_github': True, |
| 99 | + "display_github": True, |
99 | 100 | # Set the following variables to generate the resulting github URL for each page.
|
100 | 101 | # Format Template: https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/blob/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}
|
101 |
| - 'github_user': 'pyvista', |
102 |
| - 'github_repo': 'pymeshfix', |
103 |
| - 'github_version': 'master/doc/', |
104 |
| - 'menu_links_name': 'Getting Connected', |
105 |
| - 'menu_links': [ |
106 |
| - ('<i class="fa fa-slack fa-fw"></i> Slack Community', 'http://slack.pyvista.org'), |
107 |
| - ('<i class="fa fa-comment fa-fw"></i> Support', 'https://github.com/pyvista/pyvista-support'), |
108 |
| - ('<i class="fa fa-github fa-fw"></i> Source Code', 'https://github.com/pyvista/pymeshfix'), |
| 102 | + "github_user": "pyvista", |
| 103 | + "github_repo": "pymeshfix", |
| 104 | + "github_version": "master/doc/", |
| 105 | + "menu_links_name": "Getting Connected", |
| 106 | + "menu_links": [ |
| 107 | + ('<i class="fa fa-slack fa-fw"></i> Slack Community', "http://slack.pyvista.org"), |
| 108 | + ( |
| 109 | + '<i class="fa fa-comment fa-fw"></i> Support', |
| 110 | + "https://github.com/pyvista/pyvista-support", |
| 111 | + ), |
| 112 | + ('<i class="fa fa-github fa-fw"></i> Source Code', "https://github.com/pyvista/pymeshfix"), |
109 | 113 | ],
|
110 | 114 | }
|
111 | 115 |
|
|
118 | 122 | # -- Options for HTMLHelp output ---------------------------------------------
|
119 | 123 |
|
120 | 124 | # Output file base name for HTML help builder.
|
121 |
| -htmlhelp_basename = 'PyMeshFix' |
| 125 | +htmlhelp_basename = "PyMeshFix" |
122 | 126 |
|
123 | 127 |
|
124 | 128 | # -- Options for LaTeX output ------------------------------------------------
|
|
129 | 133 | # (source start file, target name, title,
|
130 | 134 | # author, documentclass [howto, manual, or own class]).
|
131 | 135 | latex_documents = [
|
132 |
| - (master_doc, 'pymeshfix.tex', 'PyMeshFix Documentation', |
133 |
| - 'Alex Kaszynski', 'manual'), |
| 136 | + (master_doc, "pymeshfix.tex", "PyMeshFix Documentation", "Alex Kaszynski", "manual"), |
134 | 137 | ]
|
135 | 138 |
|
136 | 139 |
|
137 | 140 | # -- Options for manual page output ------------------------------------------
|
138 | 141 |
|
139 | 142 | # One entry per manual page. List of tuples
|
140 | 143 | # (source start file, name, description, authors, manual section).
|
141 |
| -man_pages = [ |
142 |
| - (master_doc, 'PyMeshFix', 'PyMeshFix Documentation', |
143 |
| - [author], 1) |
144 |
| -] |
| 144 | +man_pages = [(master_doc, "PyMeshFix", "PyMeshFix Documentation", [author], 1)] |
145 | 145 |
|
146 | 146 |
|
147 | 147 | # -- Options for Texinfo output ----------------------------------------------
|
|
150 | 150 | # (source start file, target name, title, author,
|
151 | 151 | # dir menu entry, description, category)
|
152 | 152 | texinfo_documents = [
|
153 |
| - (master_doc, 'PyMeshFix', 'PyMeshFix Documentation', |
154 |
| - author, 'PyMeshFix', 'One line description of project.', |
155 |
| - 'Miscellaneous'), |
| 153 | + ( |
| 154 | + master_doc, |
| 155 | + "PyMeshFix", |
| 156 | + "PyMeshFix Documentation", |
| 157 | + author, |
| 158 | + "PyMeshFix", |
| 159 | + "One line description of project.", |
| 160 | + "Miscellaneous", |
| 161 | + ), |
156 | 162 | ]
|
157 | 163 |
|
158 | 164 |
|
|
161 | 167 | # -- Options for intersphinx extension ---------------------------------------
|
162 | 168 |
|
163 | 169 | # Example configuration for intersphinx: refer to the Python standard library.
|
164 |
| -intersphinx_mapping = {'https://docs.python.org/': None, |
165 |
| - 'https://docs.pyvista.org': None, |
166 |
| - } |
| 170 | +intersphinx_mapping = { |
| 171 | + "https://docs.python.org/": None, |
| 172 | + "https://docs.pyvista.org": None, |
| 173 | +} |
167 | 174 |
|
168 | 175 | # -- Options for todo extension ----------------------------------------------
|
169 | 176 |
|
|
181 | 188 | ],
|
182 | 189 | # path where to save gallery generated examples
|
183 | 190 | "gallery_dirs": ["examples"],
|
184 |
| - # Patter to search for example files |
| 191 | + # Pattern to search for example files |
185 | 192 | "filename_pattern": r"\.py",
|
186 | 193 | # Remove the "Download all examples" button from the top level gallery
|
187 | 194 | "download_all_examples": False,
|
|
191 | 198 | "backreferences_dir": None,
|
192 | 199 | # Modules for which function level galleries are created. In
|
193 | 200 | "doc_module": "pymeshfix",
|
194 |
| - "image_scrapers": (pyvista.Scraper(), 'matplotlib'), |
| 201 | + "image_scrapers": (pyvista.Scraper(), "matplotlib"), |
195 | 202 | "thumbnail_size": (350, 350),
|
196 | 203 | }
|
197 | 204 |
|
|
0 commit comments