Skip to content

Commit 58d75f3

Browse files
committed
docs: cleanup path config, now only for autodoc detection of modules
1 parent 42f2641 commit 58d75f3

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

docs/source/conf.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,17 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15-
# If extensions (or modules to document with autodoc) are in another directory,
16-
# add these directories to sys.path here. If the directory is relative to the
17-
# documentation root, use os.path.abspath to make it absolute, like shown here.
18-
#
1915
import os
2016
import sys
2117
from os.path import dirname
2218

23-
# set paths
24-
docs = dirname(dirname(__file__))
25-
root = dirname(docs)
26-
sys.path.insert(0, root)
27-
sys.path.insert(0, "sphinxext")
28-
sys.path.insert(0, "../..")
19+
# -- Setup system path for autodoc extensions --------------------------------
20+
#
21+
# We use autodoc to generate documentation in reference/, so we configure the
22+
# system path to help autodoc detect the binderhub module.
23+
#
24+
git_repo_root = dirname(dirname(dirname(__file__)))
25+
sys.path.insert(0, git_repo_root)
2926

3027
# -- General configuration ------------------------------------------------
3128

0 commit comments

Comments
 (0)