|
12 | 12 | # All configuration values have a default; values that are commented out |
13 | 13 | # serve to show the default. |
14 | 14 |
|
| 15 | +import datetime |
15 | 16 | import os |
16 | 17 | import sys |
17 | 18 |
|
18 | 19 | # If extensions (or modules to document with autodoc) are in another directory, |
19 | 20 | # add these directories to sys.path here. If the directory is relative to the |
20 | 21 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
21 | | -# sys.path.insert(0, os.path.abspath('.')) |
| 22 | +sys.path.insert(0, os.path.abspath("../..")) |
| 23 | + |
| 24 | +from netengine import VERSION, get_version |
22 | 25 |
|
23 | 26 | # -- General configuration ------------------------------------------------ |
24 | 27 |
|
|
28 | 31 | # Add any Sphinx extension module names here, as strings. They can be |
29 | 32 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
30 | 33 | # ones. |
31 | | -extensions = [] |
| 34 | +extensions = [ |
| 35 | + "sphinx.ext.autodoc", |
| 36 | + "sphinx.ext.viewcode", |
| 37 | + "openwisp.sphinx.theme", |
| 38 | +] |
32 | 39 |
|
33 | 40 | # Add any paths that contain templates here, relative to this directory. |
34 | 41 | templates_path = ["_templates"] |
|
44 | 51 |
|
45 | 52 | # General information about the project. |
46 | 53 | project = "netengine" |
47 | | -copyright = "OpenWISP.org" |
| 54 | +copyright = f"{datetime.date.today().year}, OpenWISP.org" |
| 55 | +author = "Federico Capoano" |
48 | 56 |
|
49 | 57 | # The version info for the project you're documenting, acts as replacement for |
50 | 58 | # |version| and |release|, also used in various other places throughout the |
51 | 59 | # built documents. |
52 | 60 | # |
53 | 61 | # The short X.Y version. |
54 | | -version = "0.1" |
| 62 | +version = f"{VERSION[0]}.{VERSION[1]}" |
55 | 63 | # The full version, including alpha/beta/rc tags. |
56 | | -release = "0.1" |
| 64 | +release = get_version() |
57 | 65 |
|
58 | 66 | # The language for content autogenerated by Sphinx. Refer to documentation |
59 | 67 | # for a list of supported languages. |
60 | | -# language = None |
| 68 | +language = "en" |
61 | 69 |
|
62 | 70 | # There are two options for replacing |today|: either, you set today to some |
63 | 71 | # non-false value, then it is used: |
|
98 | 106 |
|
99 | 107 | # The theme to use for HTML and HTML Help pages. See the documentation for |
100 | 108 | # a list of builtin themes. |
101 | | -html_theme = "default" |
| 109 | +html_theme = "openwisp-sphinx-theme" |
102 | 110 |
|
103 | 111 | # Theme options are theme-specific and customize the look and feel of a theme |
104 | 112 | # further. For a list of options available for each theme, see the |
|
198 | 206 | "index", |
199 | 207 | "netengine.tex", |
200 | 208 | "netengine Documentation", |
201 | | - "Alessandro Bucciarelli, Federico Capoano", |
| 209 | + author, |
202 | 210 | "manual", |
203 | 211 | ), |
204 | 212 | ] |
|
233 | 241 | "index", |
234 | 242 | "netengine", |
235 | 243 | "netengine Documentation", |
236 | | - ["Alessandro Bucciarelli, Federico Capoano"], |
| 244 | + [author], |
237 | 245 | 1, |
238 | 246 | ) |
239 | 247 | ] |
|
252 | 260 | "index", |
253 | 261 | "netengine", |
254 | 262 | "netengine Documentation", |
255 | | - "Alessandro Bucciarelli, Federico Capoano", |
| 263 | + author, |
256 | 264 | "netengine", |
257 | | - "One line description of project.", |
| 265 | + "Abstraction layer for extracting information from network devices.", |
258 | 266 | "Miscellaneous", |
259 | 267 | ), |
260 | 268 | ] |
|
0 commit comments