Skip to content

Commit

Permalink
FIX: Fix version of ACT at top of page (#868)
Browse files Browse the repository at this point in the history
* FIX: Fix version of ACT at top of page

* FIX: Fix when version is empty
  • Loading branch information
mgrover1 authored Oct 31, 2024
1 parent baa24dc commit 8e79388
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,20 @@
# built documents.
#
import act # noqa
import re # noqa

# Extrac the version info and parse it
verinfo = act.__version__

if verinfo is None:
verinfo = ""

parsed_version = re.search(r"(?P<full>(?P<base>\d+\.\d+)\.?\w*)", verinfo).groupdict()

# The short X.Y version.
version = act.__version__
# The full version, including alpha/beta/rc tags.
release = act.__version__
version = parsed_version["base"]
if "+" in verinfo:
version += "dev"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down

0 comments on commit 8e79388

Please sign in to comment.