Skip to content

Commit d980bab

Browse files
Cleanup sphinx conf (#397)
1 parent 53dd99c commit d980bab

File tree

1 file changed

+28
-150
lines changed

1 file changed

+28
-150
lines changed

doc/conf.py

+28-150
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,45 @@
1+
# Configuration file for the Sphinx documentation builder.
12
#
2-
# project-template documentation build configuration file, created by
3-
# sphinx-quickstart on Mon Jan 18 14:44:12 2016.
4-
#
5-
# This file is execfile()d with the current directory set to its
6-
# containing dir.
7-
#
8-
# Note that not all possible configuration values are present in this
9-
# autogenerated file.
10-
#
11-
# All configuration values have a default; values that are commented out
12-
# serve to show the default.
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
136

147
from datetime import date
15-
import sys
16-
import os
8+
import numpydoc
179

10+
# -- Path setup --------------------------------------------------------------
1811

1912
# If extensions (or modules to document with autodoc) are in another directory,
2013
# add these directories to sys.path here. If the directory is relative to the
2114
# documentation root, use os.path.abspath to make it absolute, like shown here.
2215

16+
import os
17+
import sys
18+
2319
# for example.py
2420
sys.path.insert(0, os.path.abspath("."))
2521
# project root
2622
sys.path.insert(0, os.path.abspath(".."))
2723

2824
os.environ["MPLBACKEND"] = "Agg" # avoid tkinter import errors on rtfd.io
2925

30-
# -- General configuration ---------------------------------------------------
26+
# -- Project information -----------------------------------------------------
3127

32-
# If your documentation needs a minimal Sphinx version, state it here.
33-
# needs_sphinx = '1.0'
28+
project = "numpydoc"
29+
copyright = f"2019-{date.today().year}, numpydoc maintainers"
30+
31+
# The version info for the project you're documenting, acts as replacement for
32+
# |version| and |release|, also used in various other places throughout the
33+
# built documents.
34+
#
35+
# The short X.Y version.
36+
37+
# version = .__version__
38+
# The full version, including alpha/beta/rc tags.
39+
release = numpydoc.__version__
40+
version = numpydoc.__version__
41+
42+
# -- General configuration ---------------------------------------------------
3443

3544
# Add any Sphinx extension module names here, as strings. They can be
3645
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@@ -50,75 +59,21 @@
5059
# Add any paths that contain templates here, relative to this directory.
5160
templates_path = ["_templates"]
5261

53-
# The suffix of source filenames.
54-
source_suffix = ".rst"
55-
56-
# The encoding of source files.
57-
# source_encoding = 'utf-8-sig'
58-
5962
# The root toctree document
60-
master_doc = "index" # NOTE: will be changed to `root_doc` in sphinx 4
61-
62-
# General information about the project.
63-
project = "numpydoc"
64-
copyright = f"2019-{date.today().year}, numpydoc maintainers"
65-
66-
# The version info for the project you're documenting, acts as replacement for
67-
# |version| and |release|, also used in various other places throughout the
68-
# built documents.
69-
#
70-
# The short X.Y version.
71-
72-
import numpydoc
63+
# master_doc = "index" # NOTE: will be changed to `root_doc` in sphinx 4
7364

74-
# version = .__version__
75-
# The full version, including alpha/beta/rc tags.
76-
release = numpydoc.__version__
77-
version = numpydoc.__version__
7865
numpydoc_xref_param_type = True
7966
numpydoc_xref_ignore = {"optional", "type_without_description", "BadException"}
8067
# Run docstring validation as part of build process
8168
numpydoc_validation_checks = {"all", "GL01", "SA04", "RT03"}
8269

83-
# The language for content autogenerated by Sphinx. Refer to documentation
84-
# for a list of supported languages.
85-
# language = None
86-
87-
# There are two options for replacing |today|: either, you set today to some
88-
# non-false value, then it is used:
89-
# today = ''
90-
# Else, today_fmt is used as the format for a strftime call.
91-
# today_fmt = '%B %d, %Y'
92-
9370
# List of patterns, relative to source directory, that match files and
9471
# directories to ignore when looking for source files.
95-
exclude_patterns = ["_build"]
96-
97-
# The reST default role (used for this markup: `text`) to use for all
98-
# documents.
99-
# default_role = None
100-
101-
# If true, '()' will be appended to :func: etc. cross-reference text.
102-
# add_function_parentheses = True
103-
104-
# If true, the current module name will be prepended to all description
105-
# unit titles (such as .. function::).
106-
# add_module_names = True
107-
108-
# If true, sectionauthor and moduleauthor directives will be shown in the
109-
# output. They are ignored by default.
110-
# show_authors = False
72+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
11173

11274
# The name of the Pygments (syntax highlighting) style to use.
11375
pygments_style = "sphinx"
11476

115-
# A list of ignored prefixes for module index sorting.
116-
# modindex_common_prefix = []
117-
118-
# If true, keep warnings as "system message" paragraphs in the built documents.
119-
# keep_warnings = False
120-
121-
12277
# -- Options for HTML output ----------------------------------------------
12378

12479
# The theme to use for HTML and HTML Help pages. See the documentation for
@@ -142,52 +97,6 @@
14297
# so a file named "default.css" will overwrite the builtin "default.css".
14398
html_static_path = [] # ['_static']
14499

145-
# Add any extra paths that contain custom files (such as robots.txt or
146-
# .htaccess) here, relative to this directory. These files are copied
147-
# directly to the root of the documentation.
148-
# html_extra_path = []
149-
150-
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
151-
# using the given strftime format.
152-
# html_last_updated_fmt = '%b %d, %Y'
153-
154-
# If true, SmartyPants will be used to convert quotes and dashes to
155-
# typographically correct entities.
156-
# html_use_smartypants = True
157-
158-
# Custom sidebar templates, maps document names to template names.
159-
# html_sidebars = {}
160-
161-
# Additional templates that should be rendered to pages, maps page names to
162-
# template names.
163-
# html_additional_pages = {}
164-
165-
# If false, no module index is generated.
166-
# html_domain_indices = True
167-
168-
# If false, no index is generated.
169-
# html_use_index = True
170-
171-
# If true, the index is split into individual pages for each letter.
172-
# html_split_index = False
173-
174-
# If true, links to the reST sources are added to the pages.
175-
# html_show_sourcelink = True
176-
177-
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
178-
# html_show_sphinx = True
179-
180-
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
181-
# html_show_copyright = True
182-
183-
# If true, an OpenSearch description file will be output, and all pages will
184-
# contain a <link> tag referring to it. The value of this option must be the
185-
# base URL from which the finished HTML is served.
186-
# html_use_opensearch = ''
187-
188-
# This is the file name suffix for HTML files (e.g. ".xhtml").
189-
# html_file_suffix = None
190-
191100
# Output file base name for HTML help builder.
192101
htmlhelp_basename = "project-templatedoc"
193102

@@ -216,38 +125,7 @@
216125
),
217126
]
218127

219-
# The name of an image file (relative to this directory) to place at the top of
220-
# the title page.
221-
# latex_logo = None
222-
223-
# For "manual" documents, if this is true, then toplevel headings are parts,
224-
# not chapters.
225-
# latex_use_parts = False
226-
227-
# If true, show page references after internal links.
228-
# latex_show_pagerefs = False
229-
230-
# If true, show URL addresses after external links.
231-
# latex_show_urls = False
232-
233-
# Documents to append as an appendix to all manuals.
234-
# latex_appendices = []
235-
236-
# If false, no module index is generated.
237-
# latex_domain_indices = True
238-
239-
# Documents to append as an appendix to all manuals.
240-
# texinfo_appendices = []
241-
242-
# If false, no module index is generated.
243-
# texinfo_domain_indices = True
244-
245-
# How to display URL addresses: 'footnote', 'no', or 'inline'.
246-
# texinfo_show_urls = 'footnote'
247-
248-
# If true, do not generate a @detailmenu in the "Top" node's menu.
249-
# texinfo_no_detailmenu = False
250-
128+
# -- Intersphinx setup ----------------------------------------------------
251129

252130
# Example configuration for intersphinx: refer to the Python standard library.
253131
intersphinx_mapping = {

0 commit comments

Comments
 (0)