|
3 | 3 | import re |
4 | 4 | import subprocess |
5 | 5 | import sys |
| 6 | +from datetime import datetime |
6 | 7 |
|
7 | 8 | from natsort import natsorted |
8 | 9 |
|
|
12 | 13 |
|
13 | 14 | # -- Project information ----------------------------------------------------- |
14 | 15 |
|
| 16 | +year_range = "2023" |
| 17 | +year_now = str(datetime.now().year) |
| 18 | +if year_range != year_now: |
| 19 | + year_range = year_range + chr(8211) + year_now |
| 20 | + |
15 | 21 | project = "Merlin" |
16 | | -copyright = "2023, NVIDIA" # pylint: disable=redefined-builtin |
| 22 | +copyright = year_range + ", NVIDIA" # pylint: disable=redefined-builtin |
17 | 23 | author = "NVIDIA" |
18 | 24 |
|
19 | 25 | # -- General configuration --------------------------------------------------- |
|
75 | 81 | html_theme_options = { |
76 | 82 | "repository_url": "https://github.com/NVIDIA-Merlin/Merlin", |
77 | 83 | "use_repository_button": True, |
78 | | - "footer_content_items": ["copyright.html", "last-updated.html"], |
79 | | - "extra_footer": "", |
| 84 | + "footer_content_items": ["copyright.html", "footer.html"], |
80 | 85 | "logo": {"text": "NVIDIA Merlin", "alt_text": "NVIDIA Merlin"}, |
81 | 86 | } |
82 | 87 | html_sidebars = { |
|
100 | 105 | # repo (a Git repo) vs SMV reading conf.py from an archive of the repo |
101 | 106 | # at a commit (not a Git repo). |
102 | 107 | if os.path.exists(gitdir): |
103 | | - tag_refs = subprocess.check_output(["git", "tag", "-l", "v*"]).decode("utf-8").split() |
| 108 | + tag_refs = ( |
| 109 | + subprocess.check_output(["git", "tag", "-l", "v*"]).decode("utf-8").split() |
| 110 | + ) |
104 | 111 | tag_refs = [tag for tag in tag_refs if re.match(r"^v[0-9]+.[0-9]+.[0-9]+$", tag)] |
105 | 112 | tag_refs = natsorted(tag_refs)[-6:] |
106 | 113 | smv_tag_whitelist = r"^(" + r"|".join(tag_refs) + r")$" |
|
0 commit comments