Skip to content

Commit 7d2284a

Browse files
author
SilviaAmAm
committed
⚗️ chore: Trying to get RTD to work
1 parent 23bc7b7 commit 7d2284a

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

.readthedocs.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ build:
99
os: ubuntu-24.04
1010
tools:
1111
python: "3.12"
12-
jobs:
13-
pre_create_environment:
14-
- echo `pwd`
15-
post_build:
16-
- PYTHONPATH=$PYTHONPATH:./backend/src
17-
1812

1913
# Build documentation in the "docs/" directory with Sphinx
2014
sphinx:

docs/conf.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,17 @@
88
import os
99
import sys
1010
import django
11+
import pathlib
1112

12-
sys.path.insert(0, os.path.abspath("../src"))
13+
root_folder = pathlib.Path(__file__).parent.parent
14+
src_folder = (root_folder / pathlib.Path("backend") / pathlib.Path("src") )
15+
16+
sys.path.insert(0, str(src_folder))
1317
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "openbeheer.conf.ci")
1418
django.setup()
1519

1620
import openbeheer # noqa isort:skip
1721

18-
# from objects.setup import setup_env # noqa isort:skip
19-
20-
# TODO: This needs to be enabled when we want to use autodoc to grab
21-
# documentation from classes and functions. However, enabling django.setup()
22-
# causes RTD to fail because GDAL is not present in the RTD environment.
23-
# See: https://github.com/readthedocs/readthedocs-docker-images/issues/114#issuecomment-570566599
24-
#
25-
# setup_env()
26-
# django.setup()
27-
2822
# -- Project information -----------------------------------------------------
2923

3024
project = "openbeheer"

0 commit comments

Comments
 (0)