Skip to content

Commit

Permalink
Solve version resolving for READTHEDOCS
Browse files Browse the repository at this point in the history
  • Loading branch information
gmrukwa committed Jan 17, 2021
1 parent 97eedda commit c1d3968
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
import os
import sys

import toml

sys.path.insert(0, os.path.abspath(".."))
from divik import __version__

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

Expand All @@ -20,7 +21,9 @@
author = "Grzegorz Mrukwa"

# The full version, including alpha/beta/rc tags
release = __version__
dirname = os.path.dirname(__file__)
with open(os.path.join(dirname, '../pyproject.toml')) as f:
release = toml.load(f)['tool']['poetry']['version']


# -- General configuration ---------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ sphinx
sphinx-autodoc-typehints
sphinx-rtd-theme
numpydoc
toml

0 comments on commit c1d3968

Please sign in to comment.