Auto update version and year in docs
This commit is contained in:
parent
a65b947d11
commit
a891afe75e
13
docs/conf.py
13
docs/conf.py
@ -12,8 +12,11 @@
|
||||
# serve to show the default.
|
||||
|
||||
import sys
|
||||
from datetime import date
|
||||
from pathlib import Path
|
||||
|
||||
import tomli
|
||||
|
||||
project_dir = Path(__file__).resolve().parent.parent
|
||||
sys.path.insert(0, str(project_dir))
|
||||
|
||||
@ -44,16 +47,18 @@ master_doc = "index"
|
||||
|
||||
# General information about the project.
|
||||
project = u"generic"
|
||||
copyright = u"2011, Andrey Popp, 2019, Arjan Molenaar, Dan Yeaw"
|
||||
copyright = f"2011, Andrey Popp, 2019-{date.today().year}, Arjan Molenaar and Dan Yeaw"
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = "1.0.0"
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = "1.0.0"
|
||||
version = ""
|
||||
project_dir = Path(__file__).resolve().parent.parent
|
||||
f = project_dir.joinpath("pyproject.toml")
|
||||
release = str(tomli.loads(f.read_text())["tool"]["poetry"]["version"])
|
||||
sys.path.append(str(project_dir))
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
Loading…
x
Reference in New Issue
Block a user