Skip to content

Commit

Permalink
Fix path on rtd server
Browse files Browse the repository at this point in the history
Fix rtd requirements install
  • Loading branch information
e10harvey committed Apr 16, 2024
1 parent 034c969 commit d0cebc2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.12"
python: "3.10"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
Expand All @@ -29,4 +29,6 @@ sphinx:
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: requirements.txt
- requirements: doc/requirements.txt

14 changes: 12 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,19 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
from pathlib import Path
import sys
import sys, os

sys.path.append(str(Path.cwd().parent.parent.resolve()))
# Check if we're running on Read the Docs' servers
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'

if read_the_docs_build:
cwd = os.getcwd()
print(cwd)
opencsp_path = cwd + "/../" + "../"
os.listdir(Path(opencsp_path))
sys.path.append(str(opencsp_path))
else:
sys.path.append(str(Path.cwd().parent.parent.resolve()))


# -- Project information -----------------------------------------------------
Expand Down

0 comments on commit d0cebc2

Please sign in to comment.