File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 66# -- Project information -----------------------------------------------------
77# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
88
9+ from pathlib import Path
10+
11+ try : # Python 3.11+
12+ import tomllib
13+ except ModuleNotFoundError : # pragma: no cover - fallback for older runtimes
14+ import tomli as tomllib # type: ignore
15+
916import plot3d
1017project = 'Plot3D'
1118copyright = '2025, Paht Juangphanich'
1219author = 'Paht Juangphanich <paht.juangphanich@nasa.gov>'
13- release = '1.6.8'
20+ _pyproject_path = Path (__file__ ).resolve ().parents [1 ] / 'python' / 'pyproject.toml'
21+ try :
22+ _pyproject = tomllib .loads (_pyproject_path .read_text (encoding = 'utf-8' ))
23+ release = _pyproject ['tool' ]['poetry' ]['version' ]
24+ except Exception : # pragma: no cover - fallback if file missing/unreadable
25+ release = getattr (plot3d , '__version__' , 'dev' )
26+
27+ version = release
1428
1529rst_context = {'plot3d' : plot3d }
1630
You can’t perform that action at this time.
0 commit comments