Skip to content

Commit d8b4f55

Browse files
committed
Fix path and add rtd yaml
1 parent edcaa09 commit d8b4f55

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

.readthedocs.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.11"
13+
14+
# Build documentation in the docs/ directory with Sphinx
15+
sphinx:
16+
configuration: docs/conf.py
17+
18+
# We recommend specifying your dependencies to enable reproducible builds:
19+
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20+
python:
21+
install:
22+
- requirements: requirements.txt

docs/source/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
#
1010
import os
1111
import sys
12-
sys.path.insert(0, os.path.abspath('../../'))
13-
exec(open('jort/_version.py').read())
12+
dirname = os.path.dirname(__file__)
13+
sys.path.insert(0, os.path.join(dirname, '../../'))
14+
exec(open(os.path.join(dirname, '../../jort/_version.py')).read())
1415

1516
# -- Project information -----------------------------------------------------
1617
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

0 commit comments

Comments
 (0)