diff --git a/docs/environment.yml b/docs/environment.yml index a0bcca8a3..66b9e942f 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -12,7 +12,8 @@ dependencies: - bokeh=1.0.4 - plotly=3.9.0 - ipywidgets=7.4.2 - - jupyter_sphinx=0.2.0 + # - jupyter_sphinx=0.2.1 - pip: + - git+https://github.com/jbweston/jupyter-sphinx.git@feature/disable-stderr # XXX: removed when merged in - sphinx_fontawesome==0.0.6 - m2r==0.2.1 diff --git a/docs/source/conf.py b/docs/source/conf.py index 9ce617f1f..84afc28c2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -15,10 +15,15 @@ import os import sys -sys.path.insert(0, os.path.abspath("../..")) +package_path = os.path.abspath("../..") +# Insert into sys.path so that we can import adaptive here +sys.path.insert(0, package_path) import adaptive # noqa: E402 +# Insert into PYTHONPATH so that jupyter-sphinx will pick it up +os.environ["PYTHONPATH"] = ":".join((package_path, os.environ.get("PYTHONPATH", ""))) + # -- Project information ----------------------------------------------------- project = "adaptive" @@ -88,6 +93,7 @@ "binderOptions": {"repo": "python-adaptive/adaptive"}, } +jupyter_execute_disable_stderr = True # -- Options for HTML output -------------------------------------------------