From efebea96d912a138bdf89b77078214dbe1d395b0 Mon Sep 17 00:00:00 2001 From: Hagen Wierstorf Date: Tue, 25 Jul 2023 14:49:40 +0200 Subject: [PATCH] DOC: use pyproject.toml as truth for config (#49) --- docs/conf.py | 9 +++++++-- docs/requirements.txt | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 523aa2d..22f1a2b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,12 +1,17 @@ import os import shutil +import toml + import audeer +config = toml.load(audeer.path('..', 'pyproject.toml')) + + # Project ----------------------------------------------------------------- -project = 'audmath' -author = 'Hagen Wierstorf' +project = config['project']['name'] +author = ', '.join(author['name'] for author in config['project']['authors']) version = audeer.git_repo_version() title = '{} Documentation'.format(project) diff --git a/docs/requirements.txt b/docs/requirements.txt index 4ecfe76..4b6b5d8 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -5,3 +5,4 @@ sphinx-audeering-theme >=1.1.2 sphinx_autodoc_typehints sphinx-copybutton sphinxcontrib-katex >=0.9.3 +toml