Skip to content

Commit 58bf575

Browse files
authored
Merge pull request #55 from scipp/add-masking
Add masking
2 parents dddefd0 + 78d7294 commit 58bf575

26 files changed

+1317
-956
lines changed

docs/conf.py

+46-46
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,35 @@
55
import sys
66
from importlib.metadata import version as get_version
77

8-
sys.path.insert(0, os.path.abspath('.'))
8+
sys.path.insert(0, os.path.abspath("."))
99

1010
# 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"
1414

1515
html_show_sourcelink = True
1616

1717
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",
3131
]
3232

3333
try:
3434
import sciline.sphinxext.domain_types # noqa: F401
3535

36-
extensions.append('sciline.sphinxext.domain_types')
36+
extensions.append("sciline.sphinxext.domain_types")
3737
except ModuleNotFoundError:
3838
pass
3939

@@ -56,13 +56,13 @@
5656
myst_heading_anchors = 3
5757

5858
autodoc_type_aliases = {
59-
'array_like': 'array_like',
59+
"array_like": "array_like",
6060
}
6161

6262
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),
6666
}
6767

6868
# autodocs includes everything, even irrelevant API internals. autosummary
@@ -79,40 +79,40 @@
7979
# objects without namespace: numpy
8080
"ndarray": "~numpy.ndarray",
8181
}
82-
typehints_defaults = 'comma'
82+
typehints_defaults = "comma"
8383
typehints_use_rtype = False
8484

8585

86-
sciline_domain_types_prefix = 'ess.diffraction'
86+
sciline_domain_types_prefix = "ess.diffraction"
8787
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",
9494
}
9595

9696

9797
# Add any paths that contain templates here, relative to this directory.
98-
templates_path = ['_templates']
98+
templates_path = ["_templates"]
9999

100100
# The suffix(es) of source filenames.
101101
# You can specify multiple suffix as a list of string:
102102
#
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
105105

106106
# The master toctree document.
107-
master_doc = 'index'
107+
master_doc = "index"
108108

109109
# The version info for the project you're documenting, acts as replacement for
110110
# |version| and |release|, also used in various other places throughout the
111111
# built documents.
112112
#
113113

114114
release = get_version("essdiffraction")
115-
version = ".".join(release.split('.')[:3]) # CalVer
115+
version = ".".join(release.split(".")[:3]) # CalVer
116116

117117
warning_is_error = True
118118

@@ -127,15 +127,15 @@
127127
# directories to ignore when looking for source files.
128128
# This patterns also effect to html_static_path and html_extra_path
129129
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",
135135
]
136136

137137
# The name of the Pygments (syntax highlighting) style to use.
138-
pygments_style = 'sphinx'
138+
pygments_style = "sphinx"
139139

140140
# If true, `todo` and `todoList` produce output, else they produce nothing.
141141
todo_include_todos = False
@@ -200,14 +200,14 @@
200200
# Add any paths that contain custom static files (such as style sheets) here,
201201
# relative to this directory. They are copied after the builtin static files,
202202
# so a file named "default.css" will overwrite the builtin "default.css".
203-
html_static_path = ['_static']
203+
html_static_path = ["_static"]
204204
html_css_files = []
205205
html_js_files = ["anaconda-icon.js"]
206206

207207
# -- Options for HTMLHelp output ------------------------------------------
208208

209209
# Output file base name for HTML help builder.
210-
htmlhelp_basename = 'essdiffractiondoc'
210+
htmlhelp_basename = "essdiffractiondoc"
211211

212212
# -- Options for Matplotlib in notebooks ----------------------------------
213213

@@ -223,7 +223,7 @@
223223
# In addition, there is no need to make plots in doctest as the documentation
224224
# build already tests if those plots can be made.
225225
# So we simply disable plots in doctests.
226-
doctest_global_setup = '''
226+
doctest_global_setup = """
227227
import numpy as np
228228
229229
try:
@@ -240,7 +240,7 @@ def do_not_plot(*args, **kwargs):
240240
except ImportError:
241241
# Scipp is not needed by docs if it is not installed.
242242
pass
243-
'''
243+
"""
244244

245245
# Using normalize whitespace because many __str__ functions in scipp produce
246246
# extraneous empty lines and it would look strange to include them in the docs.
@@ -255,5 +255,5 @@ def do_not_plot(*args, **kwargs):
255255

256256
linkcheck_ignore = [
257257
# 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]+/.+?#",
259259
]

0 commit comments

Comments
 (0)