25
25
# Thus, any C-extensions that are needed to build the documentation will *not*
26
26
# be accessible, and the documentation will not build correctly.
27
27
28
- import os
29
28
import sys
30
29
import datetime
31
- from importlib import import_module
30
+
31
+ from saomsg import __version__
32
32
33
33
try :
34
34
from sphinx_astropy .conf .v1 import * # noqa
35
35
except ImportError :
36
36
print ('ERROR: the documentation requires the sphinx-astropy package to be installed' )
37
37
sys .exit (1 )
38
38
39
- # Get configuration information from setup.cfg
40
- from configparser import ConfigParser
41
- conf = ConfigParser ()
42
-
43
- conf .read ([os .path .join (os .path .dirname (__file__ ), '..' , 'setup.cfg' )])
44
- setup_cfg = dict (conf .items ('metadata' ))
45
-
46
39
# -- General configuration ----------------------------------------------------
47
40
48
41
# By default, highlight as Python 3.
49
42
highlight_language = 'python3'
50
43
51
- # If your documentation needs a minimal Sphinx version, state it here.
52
- #needs_sphinx = '1.2'
53
-
54
- # To perform a Sphinx version check that needs to be more specific than
55
- # major.minor, call `check_sphinx_version("x.y.z")` here.
56
- # check_sphinx_version("1.2.1")
57
-
58
- # List of patterns, relative to source directory, that match files and
59
- # directories to ignore when looking for source files.
60
- exclude_patterns .append ('_templates' )
61
-
62
- # This is added to the end of RST files - a good place to put substitutions to
63
- # be used globally.
64
- rst_epilog += """
65
- """
66
-
67
44
# -- Project information ------------------------------------------------------
68
45
69
46
# This does not *have* to match the package name, but typically does
70
- project = setup_cfg [ 'name' ]
71
- author = setup_cfg [ 'author' ]
47
+ project = 'saomsg'
48
+ author = "T. E. Pickering"
72
49
copyright = '{0}, {1}' .format (
73
- datetime .datetime .now ().year , setup_cfg [ ' author' ] )
50
+ datetime .datetime .now ().year , author )
74
51
75
52
# The version info for the project you're documenting, acts as replacement for
76
53
# |version| and |release|, also used in various other places throughout the
77
54
# built documents.
78
55
79
- import_module (setup_cfg ['name' ])
80
- package = sys .modules [setup_cfg ['name' ]]
81
-
82
56
# The short X.Y version.
83
- version = package . __version__ .split ('-' , 1 )[0 ]
57
+ version = __version__ .split ('-' , 1 )[0 ]
84
58
# The full version, including alpha/beta/rc tags.
85
- release = package . __version__
59
+ release = __version__
86
60
87
61
88
62
# -- Options for HTML output --------------------------------------------------
109
83
'logotext1' : 'py-saomsg' , # white, semi-bold
110
84
'logotext2' : '' , # orange, light
111
85
'logotext3' : ':docs' # white, light
112
- }
86
+ }
113
87
114
88
115
89
# Custom sidebar templates, maps document names to template names.
151
125
man_pages = [('index' , project .lower (), project + u' Documentation' ,
152
126
[author ], 1 )]
153
127
154
-
155
- # -- Options for the edit_on_github extension ---------------------------------
156
-
157
- if setup_cfg .get ('edit_on_github' ).lower () == 'true' :
158
-
159
- extensions += ['sphinx_astropy.ext.edit_on_github' ]
160
-
161
- edit_on_github_project = setup_cfg ['github_project' ]
162
- edit_on_github_branch = "main"
163
-
164
- edit_on_github_source_root = ""
165
- edit_on_github_doc_root = "docs"
166
-
167
- # -- Resolving issue number to links in changelog -----------------------------
168
- github_issues_url = 'https://github.com/{0}/issues/' .format (setup_cfg ['github_project' ])
169
-
170
128
# -- Turn on nitpicky mode for sphinx (to warn about references not found) ----
171
129
#
172
- # nitpicky = True
173
- # nitpick_ignore = []
174
- #
175
- # Some warnings are impossible to suppress, and you can list specific references
176
- # that should be ignored in a nitpick-exceptions file which should be inside
177
- # the docs/ directory. The format of the file should be:
178
- #
179
- # <type> <class>
180
- #
181
- # for example:
182
- #
183
- # py:class astropy.io.votable.tree.Element
184
- # py:class astropy.io.votable.tree.SimpleElement
185
- # py:class astropy.io.votable.tree.SimpleElementWithContent
186
- #
187
- # Uncomment the following lines to enable the exceptions:
188
- #
189
- # for line in open('nitpick-exceptions'):
190
- # if line.strip() == "" or line.startswith("#"):
191
- # continue
192
- # dtype, target = line.split(None, 1)
193
- # target = target.strip()
194
- # nitpick_ignore.append((dtype, six.u(target)))
130
+ nitpicky = True
131
+
132
+ # -- Options for linkcheck output -------------------------------------------
133
+ linkcheck_retry = 5
134
+ linkcheck_ignore = [
135
+ "https://www.aanda.org/" ,
136
+ ]
137
+ linkcheck_timeout = 180
138
+ linkcheck_anchors = False
0 commit comments