Skip to content

Commit

Permalink
Merge pull request #85 from e10harvey/main_update
Browse files Browse the repository at this point in the history
Enable RTD build on main
  • Loading branch information
e10harvey authored Apr 17, 2024
2 parents 36b11b0 + d0cebc2 commit 8f6cbb4
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: doc/source/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# 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 8f6cbb4

Please sign in to comment.