Skip to content

Commit

Permalink
fix docs config
Browse files Browse the repository at this point in the history
  • Loading branch information
gcroci2 committed Sep 18, 2023
1 parent 82f7e15 commit 8a465ea
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,9 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
import os
import toml
import sys

config = configparser.ConfigParser()
config.read('./../setup.cfg')
CONFIG = {}
for section in config.sections():
CONFIG[section] = {}
for option in config.options(section):
CONFIG[section][option] = config.get(section, option)

autodoc_mock_imports = [
'numpy',
'scipy',
Expand Down Expand Up @@ -107,7 +100,9 @@
# built documents.
#
# The short X.Y version.
version = CONFIG['metadata']['version']
with open('./../pyproject.toml', 'r') as f:
toml_file = toml.load(f)
version = toml_file['project']['version']
# The full version, including alpha/beta/rc tags.
release = version

Expand Down

0 comments on commit 8a465ea

Please sign in to comment.