|
10 | 10 |
|
11 | 11 | # General information about the project.
|
12 | 12 | project = u'ESSdiffraction'
|
13 |
| -copyright = u'2023 Scipp contributors' |
| 13 | +copyright = u'2024 Scipp contributors' |
14 | 14 | author = u'Scipp contributors'
|
15 | 15 |
|
16 | 16 | html_show_sourcelink = True
|
|
23 | 23 | 'sphinx.ext.intersphinx',
|
24 | 24 | 'sphinx.ext.mathjax',
|
25 | 25 | 'sphinx.ext.napoleon',
|
| 26 | + 'sphinx.ext.viewcode', |
26 | 27 | 'sphinx_autodoc_typehints',
|
27 | 28 | 'sphinx_copybutton',
|
28 | 29 | 'sphinx_design',
|
29 | 30 | 'nbsphinx',
|
30 | 31 | 'myst_parser',
|
31 | 32 | ]
|
| 33 | +try: |
| 34 | + import sciline.sphinxext.domain_types # noqa: F401 |
| 35 | + |
| 36 | + extensions.append('sciline.sphinxext.domain_types') |
| 37 | +except ModuleNotFoundError: |
| 38 | + pass |
32 | 39 |
|
33 | 40 | myst_enable_extensions = [
|
34 | 41 | "amsmath",
|
|
54 | 61 | intersphinx_mapping = {
|
55 | 62 | 'python': ('https://docs.python.org/3', None),
|
56 | 63 | 'numpy': ('https://numpy.org/doc/stable/', None),
|
| 64 | + 'scipp': ('https://scipp.github.io/', None), |
57 | 65 | }
|
58 | 66 |
|
59 | 67 | # autodocs includes everything, even irrelevant API internals. autosummary
|
|
73 | 81 | typehints_defaults = 'comma'
|
74 | 82 | typehints_use_rtype = False
|
75 | 83 |
|
| 84 | +sciline_domain_types_prefix = 'ess.diffraction' |
| 85 | +sciline_domain_types_aliases = { |
| 86 | + 'scipp._scipp.core.DataArray': 'scipp.DataArray', |
| 87 | + 'scipp._scipp.core.Dataset': 'scipp.Dataset', |
| 88 | + 'scipp._scipp.core.DType': 'scipp.DType', |
| 89 | + 'scipp._scipp.core.Unit': 'scipp.Unit', |
| 90 | + 'scipp._scipp.core.Variable': 'scipp.Variable', |
| 91 | + 'scipp.core.data_group.DataGroup': 'scipp.DataGroup', |
| 92 | +} |
| 93 | + |
76 | 94 | # Add any paths that contain templates here, relative to this directory.
|
77 | 95 | templates_path = ['_templates']
|
78 | 96 |
|
|
0 commit comments