Skip to content

Commit 54c7a7d

Browse files
committed
Set version in docs automatically
1 parent 4494166 commit 54c7a7d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/conf.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import os
1515
import sys
16+
from importlib.metadata import version as get_version
1617

1718
sys.path.insert(0, os.path.abspath(".."))
1819

@@ -23,10 +24,8 @@
2324
copyright = "2023, Matthew Price and Jason McEwen"
2425
author = "Matthew Price, Jason McEwen, Matthew Graham, Sofia Miñano, Devaraj Gopinathan"
2526

26-
# The short X.Y version
27-
version = "1.1.1"
28-
# The full version, including alpha/beta/rc tags
29-
release = "1.1.1"
27+
release = get_version("s2fft")
28+
version = ".".join(release.split(".")[:2])
3029

3130

3231
# -- General configuration ---------------------------------------------------

0 commit comments

Comments
 (0)