5
5
import sys
6
6
from importlib .metadata import version as get_version
7
7
8
- sys .path .insert (0 , os .path .abspath ('.' ))
8
+ sys .path .insert (0 , os .path .abspath ("." ))
9
9
10
10
# General information about the project.
11
- project = ' ESSdiffraction'
12
- copyright = ' 2024 Scipp contributors'
13
- author = ' Scipp contributors'
11
+ project = " ESSdiffraction"
12
+ copyright = " 2024 Scipp contributors"
13
+ author = " Scipp contributors"
14
14
15
15
html_show_sourcelink = True
16
16
17
17
extensions = [
18
- ' sphinx.ext.autodoc' ,
19
- ' sphinx.ext.autosummary' ,
20
- ' sphinx.ext.doctest' ,
21
- ' sphinx.ext.githubpages' ,
22
- ' sphinx.ext.intersphinx' ,
23
- ' sphinx.ext.mathjax' ,
24
- ' sphinx.ext.napoleon' ,
25
- ' sphinx.ext.viewcode' ,
26
- ' sphinx_autodoc_typehints' ,
27
- ' sphinx_copybutton' ,
28
- ' sphinx_design' ,
29
- ' nbsphinx' ,
30
- ' myst_parser' ,
18
+ " sphinx.ext.autodoc" ,
19
+ " sphinx.ext.autosummary" ,
20
+ " sphinx.ext.doctest" ,
21
+ " sphinx.ext.githubpages" ,
22
+ " sphinx.ext.intersphinx" ,
23
+ " sphinx.ext.mathjax" ,
24
+ " sphinx.ext.napoleon" ,
25
+ " sphinx.ext.viewcode" ,
26
+ " sphinx_autodoc_typehints" ,
27
+ " sphinx_copybutton" ,
28
+ " sphinx_design" ,
29
+ " nbsphinx" ,
30
+ " myst_parser" ,
31
31
]
32
32
33
33
try :
34
34
import sciline .sphinxext .domain_types # noqa: F401
35
35
36
- extensions .append (' sciline.sphinxext.domain_types' )
36
+ extensions .append (" sciline.sphinxext.domain_types" )
37
37
except ModuleNotFoundError :
38
38
pass
39
39
56
56
myst_heading_anchors = 3
57
57
58
58
autodoc_type_aliases = {
59
- ' array_like' : ' array_like' ,
59
+ " array_like" : " array_like" ,
60
60
}
61
61
62
62
intersphinx_mapping = {
63
- ' python' : (' https://docs.python.org/3' , None ),
64
- ' numpy' : (' https://numpy.org/doc/stable/' , None ),
65
- ' scipp' : (' https://scipp.github.io/' , None ),
63
+ " python" : (" https://docs.python.org/3" , None ),
64
+ " numpy" : (" https://numpy.org/doc/stable/" , None ),
65
+ " scipp" : (" https://scipp.github.io/" , None ),
66
66
}
67
67
68
68
# autodocs includes everything, even irrelevant API internals. autosummary
79
79
# objects without namespace: numpy
80
80
"ndarray" : "~numpy.ndarray" ,
81
81
}
82
- typehints_defaults = ' comma'
82
+ typehints_defaults = " comma"
83
83
typehints_use_rtype = False
84
84
85
85
86
- sciline_domain_types_prefix = ' ess.diffraction'
86
+ sciline_domain_types_prefix = " ess.diffraction"
87
87
sciline_domain_types_aliases = {
88
- ' scipp._scipp.core.DataArray' : ' scipp.DataArray' ,
89
- ' scipp._scipp.core.Dataset' : ' scipp.Dataset' ,
90
- ' scipp._scipp.core.DType' : ' scipp.DType' ,
91
- ' scipp._scipp.core.Unit' : ' scipp.Unit' ,
92
- ' scipp._scipp.core.Variable' : ' scipp.Variable' ,
93
- ' scipp.core.data_group.DataGroup' : ' scipp.DataGroup' ,
88
+ " scipp._scipp.core.DataArray" : " scipp.DataArray" ,
89
+ " scipp._scipp.core.Dataset" : " scipp.Dataset" ,
90
+ " scipp._scipp.core.DType" : " scipp.DType" ,
91
+ " scipp._scipp.core.Unit" : " scipp.Unit" ,
92
+ " scipp._scipp.core.Variable" : " scipp.Variable" ,
93
+ " scipp.core.data_group.DataGroup" : " scipp.DataGroup" ,
94
94
}
95
95
96
96
97
97
# Add any paths that contain templates here, relative to this directory.
98
- templates_path = [' _templates' ]
98
+ templates_path = [" _templates" ]
99
99
100
100
# The suffix(es) of source filenames.
101
101
# You can specify multiple suffix as a list of string:
102
102
#
103
- source_suffix = [' .rst' , ' .md' ]
104
- html_sourcelink_suffix = '' # Avoid .ipynb.txt extensions in sources
103
+ source_suffix = [" .rst" , " .md" ]
104
+ html_sourcelink_suffix = "" # Avoid .ipynb.txt extensions in sources
105
105
106
106
# The master toctree document.
107
- master_doc = ' index'
107
+ master_doc = " index"
108
108
109
109
# The version info for the project you're documenting, acts as replacement for
110
110
# |version| and |release|, also used in various other places throughout the
111
111
# built documents.
112
112
#
113
113
114
114
release = get_version ("essdiffraction" )
115
- version = "." .join (release .split ('.' )[:3 ]) # CalVer
115
+ version = "." .join (release .split ("." )[:3 ]) # CalVer
116
116
117
117
warning_is_error = True
118
118
127
127
# directories to ignore when looking for source files.
128
128
# This patterns also effect to html_static_path and html_extra_path
129
129
exclude_patterns = [
130
- ' _build' ,
131
- ' Thumbs.db' ,
132
- ' .DS_Store' ,
133
- ' **.ipynb_checkpoints' ,
134
- ' user-guide/sns-instruments/preprocess_files.ipynb' ,
130
+ " _build" ,
131
+ " Thumbs.db" ,
132
+ " .DS_Store" ,
133
+ " **.ipynb_checkpoints" ,
134
+ " user-guide/sns-instruments/preprocess_files.ipynb" ,
135
135
]
136
136
137
137
# The name of the Pygments (syntax highlighting) style to use.
138
- pygments_style = ' sphinx'
138
+ pygments_style = " sphinx"
139
139
140
140
# If true, `todo` and `todoList` produce output, else they produce nothing.
141
141
todo_include_todos = False
200
200
# Add any paths that contain custom static files (such as style sheets) here,
201
201
# relative to this directory. They are copied after the builtin static files,
202
202
# so a file named "default.css" will overwrite the builtin "default.css".
203
- html_static_path = [' _static' ]
203
+ html_static_path = [" _static" ]
204
204
html_css_files = []
205
205
html_js_files = ["anaconda-icon.js" ]
206
206
207
207
# -- Options for HTMLHelp output ------------------------------------------
208
208
209
209
# Output file base name for HTML help builder.
210
- htmlhelp_basename = ' essdiffractiondoc'
210
+ htmlhelp_basename = " essdiffractiondoc"
211
211
212
212
# -- Options for Matplotlib in notebooks ----------------------------------
213
213
223
223
# In addition, there is no need to make plots in doctest as the documentation
224
224
# build already tests if those plots can be made.
225
225
# So we simply disable plots in doctests.
226
- doctest_global_setup = '''
226
+ doctest_global_setup = """
227
227
import numpy as np
228
228
229
229
try:
@@ -240,7 +240,7 @@ def do_not_plot(*args, **kwargs):
240
240
except ImportError:
241
241
# Scipp is not needed by docs if it is not installed.
242
242
pass
243
- '''
243
+ """
244
244
245
245
# Using normalize whitespace because many __str__ functions in scipp produce
246
246
# extraneous empty lines and it would look strange to include them in the docs.
@@ -255,5 +255,5 @@ def do_not_plot(*args, **kwargs):
255
255
256
256
linkcheck_ignore = [
257
257
# Specific lines in Github blobs cannot be found by linkcheck.
258
- r' https?://github\.com/.*?/blob/[a-f0-9]+/.+?#' ,
258
+ r" https?://github\.com/.*?/blob/[a-f0-9]+/.+?#" ,
259
259
]
0 commit comments