diff --git a/docs/requirements.txt b/docs/requirements.txt index 33ba547..4fecd0d 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,4 +2,5 @@ sphinx-rtd-theme==1.0.0 Sphinx==4.5.0 sphinx-design==0.2.0 sphinx-toolbox==3.1.2 -sphinx-hoverxref==1.1.3 \ No newline at end of file +sphinx-hoverxref==1.1.3 +toml==0.10.2 \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index e8b9bab..7dcba27 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,18 +12,20 @@ # import os import sys +import toml sys.path.insert(0, os.path.abspath(os.path.join('..', '..'))) # -- Project information ----------------------------------------------------- +metadata = toml.load(os.path.normpath('../../pyproject.toml')) -project = 'WinMagnification' +project = metadata['project']['name'] +author = metadata['project']['authors'][0]['name'] # noinspection PyShadowingBuiltins -copyright = '2022, MaxBQb' -author = 'MaxBQb' +copyright = f'2022, {author}' # The full version, including alpha/beta/rc tags -release = '0.0.1' +release = metadata['project']['version'] # -- General configuration --------------------------------------------------- @@ -47,8 +49,8 @@ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', ] -github_username = 'MaxBQb' -github_repository = 'WinMagnification' +github_username = author +github_repository = project add_module_names = False hoverxref_auto_ref = True hoverxref_domains = ['py'] diff --git a/pyproject.toml b/pyproject.toml index aca9d3d..fdf1d77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "WinMagnification" -version = "0.0.1" +version = "0.1.0" authors = [ { name="MaxBQb" }, ] @@ -22,7 +22,7 @@ classifiers = [ [project.urls] "Homepage" = "https://github.com/MaxBQb/WinMagnification" "Bug Tracker" = "https://github.com/MaxBQb/WinMagnification/issues" -"Documentation" = "https://winmagnification.readthedocs.io/en/latest/", +"Documentation" = "https://winmagnification.readthedocs.io/en/latest/" [build-system] requires = ["setuptools>=61.0"]