Skip to content

Commit 74ab2de

Browse files
committed
fix versioning issues
1 parent bd3dfcd commit 74ab2de

File tree

5 files changed

+25
-5
lines changed

5 files changed

+25
-5
lines changed

docs/source/conf.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,35 @@
55

66
# -- Project information -----------------------------------------------------
77
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8-
import os
8+
import re
9+
from pathlib import Path
910

1011
project = 'PySHRED'
1112
copyright = '2025, Kutz Research Group'
1213
author = 'Kutz Research Group'
1314

14-
version = release = "v1.0.21"
15+
def get_version_from_setup():
16+
"""Extract version from setup.py"""
17+
setup_py = Path(__file__).parent.parent.parent / "setup.py"
18+
content = setup_py.read_text()
19+
# Look for version="..." pattern
20+
match = re.search(r'version\s*=\s*["\']([^"\']+)["\']', content)
21+
print('--------------------------------')
22+
print('match', match)
23+
print('--------------------------------')
24+
if match:
25+
return match.group(1)
26+
return "unknown"
27+
28+
version = release = get_version_from_setup()
1529

1630
# -- General configuration ---------------------------------------------------
1731
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1832

1933
html_show_sourcelink = False
2034

35+
smv_tag_whitelist = r'^v\d+\.\d+\.\d+$'
36+
2137
extensions = [
2238
"sphinx.ext.autodoc", # pull in docstrings
2339
"sphinx.ext.napoleon", # understand Google & NumPy styles

docs/source/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ <h1>Welcome to the PySHRED documentation</h1>
4747
<li>
4848
<a href="v1.0.0/index.html">v1.0.0</a>
4949
</li>
50+
<li>
51+
<a href="v1.0.21/index.html">v1.0.21</a>
52+
</li>
5053
</ul>
5154
</body>
5255
</html>

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PySHRED documentation
77
=====================
88

99

10-
Version: |version|
10+
.. Version: |version|
1111
1212
**Useful links:** `Installation <https://pyshred-dev.github.io/pyshred/stable/user_guide/installation.html>`_ |
1313
`Source repository <https://github.com/PyShred-Dev/PyShred>`_ |

docs/source/release_notes/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ Release Notes
55
:maxdepth: 1
66
:glob:
77

8-
v1_0_0
8+
v1_0_0
9+
v1_0_21

docs/source/release_notes/v1_0_21.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# v1.0.0 — Fix Non-Functional Bugs
1+
# v1.0.21 — Fix Non-Functional Bugs
22

33
Released: 2025-06-25
44

0 commit comments

Comments
 (0)