Skip to content

Commit

Permalink
STY: version in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jklenzing committed Jun 10, 2021
1 parent a1d0721 commit 7b6ec38
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/conf.py
Expand Up @@ -17,7 +17,6 @@
import sys
# Need to set path before this can be imported
sys.path.insert(0, os.path.abspath('..'))
from sami2py import __version__ # noqa: E402

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

Expand All @@ -28,9 +27,13 @@
copyright = ', '.join(['2021', author])

# The short X.Y version
version = __version__[::-1].partition('.')[2][::-1]
# The full version, including alpha/beta/rc tags
release = __version__
module_dir = os.path.split(os.path.abspath(os.path.dirname(__file__)))[0]
version_file = os.path.join(module_dir, project, 'version.txt')
with open(version_file, 'r') as fin:
version = fin.read().strip()

# The full version, including alpha/beta/rc tags.
release = '{:s}-alpha'.format(version)


# -- General configuration ---------------------------------------------------
Expand Down

0 comments on commit 7b6ec38

Please sign in to comment.