Skip to content

Commit

Permalink
changed documentation conf.py to fetch information from pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesper Brunnstroem committed Oct 29, 2024
1 parent 312f2b6 commit 04445eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,23 @@
sys.path.append(os.path.abspath("./_ext"))
#os.environ["NUMBA_DISABLE_JIT"] = '1'

import pathlib
import tomllib
with open(pathlib.Path(__file__).parent.parent.parent / "pyproject.toml", "rb") as f:
toml = tomllib.load(f)
pyproject = toml["project"]

#sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'riecovest'
copyright = '2023, Jesper Brunnström'
author = 'Jesper Brunnström'
project = pyproject["name"]
copyright = f"2024, {pyproject['authors'][0]['name']}"
author = pyproject["authors"][0]["name"]

# The full version, including alpha/beta/rc tags
release = '0.0.1'
release = pyproject["version"]


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = [
{name = "Jesper Brunnström", email = "jesper_brunnstrom@hotmail.com"}
]
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.11"
classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
Expand Down

0 comments on commit 04445eb

Please # to comment.