Skip to content

Commit cf45bf0

Browse files
committed
update .readthedocs.yaml
1 parent 7121906 commit cf45bf0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/sphinx/source/conf.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
import os
1414
import sys
15-
sys.path.insert(0, os.path.abspath('../../../'))
15+
three_up = os.path.abspath(os.path.join('..', '..', '..'))
16+
sys.path.insert(0, three_up)
1617

1718
from recommonmark.parser import CommonMarkParser
1819

@@ -23,8 +24,12 @@
2324
copyright = '2021, Anton Obukhov'
2425
author = 'Anton Obukhov'
2526

27+
with open(os.path.join(three_up, 'torch_fidelity', 'version.py')) as f:
28+
version_pycode = f.read()
29+
exec(version_pycode)
30+
2631
# The full version, including alpha/beta/rc tags
27-
release = '0.3.0'
32+
release = __version__
2833

2934

3035
# -- General configuration ---------------------------------------------------

0 commit comments

Comments
 (0)