1
|
|
|
# -*- coding: utf-8 -*- |
2
|
|
|
"""Configuration for apexpy documentation.""" |
3
|
|
|
import json |
4
|
|
|
import os |
5
|
|
|
from pyproject_parser import PyProject |
6
|
|
|
|
7
|
|
|
extensions = ['sphinx.ext.autodoc', |
8
|
|
|
'sphinx.ext.autosummary', |
9
|
|
|
'sphinx.ext.coverage', |
10
|
|
|
'sphinx.ext.viewcode', |
11
|
|
|
'sphinx.ext.githubpages', |
12
|
|
|
'sphinx.ext.napoleon', |
13
|
|
|
'sphinx.ext.extlinks', |
14
|
|
|
'autoapi.extension'] |
15
|
|
|
|
16
|
|
|
# General information about the project. |
17
|
|
|
info = PyProject.load("../pyproject.toml") |
18
|
|
|
|
19
|
|
|
# Define common elements |
20
|
|
|
source_suffix = '.rst' |
21
|
|
|
master_doc = 'index' |
22
|
|
|
project = 'ApexPy' |
23
|
|
|
year = '2024' |
24
|
|
|
zenodo = json.loads(open('../.zenodo.json').read()) |
25
|
|
|
author = ' and '.join([zcreator['name'] for zcreator in zenodo['creators']]) |
26
|
|
|
copyright = ', '.join([year, author]) |
27
|
|
|
version = release = info.project['version'].base_version |
28
|
|
|
|
29
|
|
|
# Configure autoapi |
30
|
|
|
autoapi_type = 'python' |
31
|
|
|
autoapi_dirs = ['../apexpy'] |
32
|
|
|
autoapi_keep_files = True |
33
|
|
|
autoapi_root = 'autoapi/generated' |
34
|
|
|
|
35
|
|
|
# The name of an image file (relative to this directory) to place at the top |
36
|
|
|
# of the sidebar. |
37
|
|
|
html_logo = os.path.join(os.path.abspath('.'), 'apexpy.png') |
38
|
|
|
|
39
|
|
|
# The theme to use for HTML and HTML Help pages. See the documentation for |
40
|
|
|
# a list of builtin themes. |
41
|
|
|
html_theme = 'sphinx_rtd_theme' |
42
|
|
|
html_theme_path = ["_themes", ] |
43
|
|
|
|
44
|
|
|
pygments_style = 'trac' |
45
|
|
|
templates_path = ['.'] |
46
|
|
|
html_use_smartypants = True |
47
|
|
|
html_last_updated_fmt = '%b %d, %Y' |
48
|
|
|
html_split_index = True |
49
|
|
|
html_sidebars = {'**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html']} |
50
|
|
|
html_short_title = '-'.join([project, version]) |
51
|
|
|
autodoc_member_order = 'bysource' |
52
|
|
|
autodoc_mock_imports = ['apexpy'] |
53
|
|
|
napoleon_use_ivar = True |
54
|
|
|
napoleon_use_rtype = False |
55
|
|
|
napoleon_use_param = False |
56
|
|
|
|
57
|
|
|
extlinks = {'doi': ('http://dx.doi.org/%s', 'doi:%s')} |
58
|
|
|
|