From 51156a4762139e0c296ad84c95c65a8edaf49a8f Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 19 Mar 2024 14:17:05 +0100 Subject: [PATCH] avoid duplicate jupyterhub installation almost every time installing docs/requirements.txt happens, JupyterHub is already installed adding an `--editable` here ensures a full rebuild happens every time, which is very slow --- .github/workflows/test-docs.yml | 2 +- .readthedocs.yaml | 1 + docs/requirements.txt | 13 +++---------- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml index eb83d33b..97bdfa60 100644 --- a/.github/workflows/test-docs.yml +++ b/.github/workflows/test-docs.yml @@ -64,7 +64,7 @@ jobs: - name: Install requirements run: | - pip install -r docs/requirements.txt pytest + pip install -e . -r docs/requirements.txt pytest - name: pytest docs/ run: | diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 1b783e0a..432093fd 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -15,6 +15,7 @@ build: python: install: + - path: . - requirements: docs/requirements.txt formats: diff --git a/docs/requirements.txt b/docs/requirements.txt index 54683842..5f174d5a 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,13 +1,6 @@ -# We install the jupyterhub package to help autodoc-traits inspect it and -# generate documentation. -# -# FIXME: If there is a way for this requirements.txt file to pass a flag that -# the build system can intercept to not build the javascript artifacts, -# then do so so. That would mean that installing the documentation can -# avoid needing node/npm installed. -# ---editable . - +# docs also require jupyterhub itself to be installed +# don't depend on it here, as that often results in a duplicate +# installation of jupyterhub that's already installed autodoc-traits jupyterhub-sphinx-theme myst-parser>=0.19