|
20 | 20 | # Standard libraries |
21 | 21 | import os |
22 | 22 | import sys |
| 23 | +from datetime import datetime |
23 | 24 |
|
24 | 25 | # Third-party libraries |
25 | 26 | import tomlkit |
|
32 | 33 | # is relative to the documentation root, use os.path.abspath to make it |
33 | 34 | # absolute, like shown here. |
34 | 35 |
|
35 | | -# Recursively import all directories containing Pyhon scripts. |
| 36 | +# Recursively import all directories containing Python scripts. |
36 | 37 | directories = ("analysis", "python", "simulation") |
37 | 38 | for directory in directories: |
38 | | - for path in os.walk(os.path.abspath("../../" + directory)): |
39 | | - sys.path.insert(1, path[0]) |
| 39 | + for root, _dirs, _files in os.walk(os.path.abspath("../../" + directory)): |
| 40 | + if os.path.basename(os.path.normpath(root)) not in ("", "__pycache__"): |
| 41 | + sys.path.insert(1, root) |
40 | 42 |
|
41 | 43 |
|
42 | 44 | # -- Project information ----------------------------------------------- |
|
50 | 52 | author = ", ".join(str(dct["name"]) for dct in metadata["project"]["authors"]) |
51 | 53 |
|
52 | 54 | # A copyright statement in the style "2008, Author Name". |
53 | | -years = "2021, 2022" |
| 55 | +now = datetime.now().year |
| 56 | +years = "2021-{}, ".format(now) |
54 | 57 | copyright = "Copyright (C) " + years + " " + author # noqa: A001 |
55 | 58 |
|
56 | 59 | # The short X.Y version |
|
228 | 231 | default_role = None |
229 | 232 |
|
230 | 233 | # If your documentation needs a minimal Sphinx version, state it here. |
231 | | -needs_sphinx = "3.0" |
| 234 | +needs_sphinx = "5.0" |
232 | 235 |
|
233 | 236 | # If true, Sphinx will warn about all references where the target cannot |
234 | 237 | # be found. This includes also argument types like "array_like", |
|
304 | 307 | # large. |
305 | 308 | html_favicon = "../logo/hpcss_favicon_32x32.png" |
306 | 309 |
|
307 | | -# A list of CSS files. Filenams must be relative to html_static_path. |
| 310 | +# A list of CSS files. Filenames must be relative to html_static_path. |
308 | 311 | html_css_files = ["custom.css"] |
309 | 312 |
|
310 | 313 | # A list of paths that contain custom static files (such as style sheets |
|
0 commit comments