You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
repo
└── book
├── conf.py
└── notebooks
└── nb.ipynb
To build the book, I have to run Jupyterbook in repo and I want notebooks/ to be in jupyterlite_contents.
If I set jupyterlite_contents = ["book/notebooks"], glob in 1. will be able to find it since for glob, the root dir is repo, but when jupyter lite build runs in 2., since its cwd is book, it won't find book/notebooks and the build will fail.
If I set jupyterlite_contents = ["notebooks"] instead, glob in 1. won't find it, sot it will silently remove it from the list. The build will succeed but the notebook won't be picked up.
Either way, I can't get notebook in my build if it's not run from app.srcdir.
A simple fix would be to set glob's rootdir parameter to src.appdir. It would still allow adding paths outside of the appdir using ... I can send a PR as soon as I have you go, or as soon as we figure out another solution if this one doesn't work, as I am very interested in having this fixed :-)
The text was updated successfully, but these errors were encountered:
When the top build command is run outside of Sphinx'
srcdir
(which is the case when buliding from Jupyterbook for instance) the following happens:jupyterlite_contents
path are expanded with glob using the cwd as root. This means that paths that don't exist after expansion are removed from the list.jupyter lite build
is invoked usingapp.srcdir
as cwd.So say I have the following structure
To build the book, I have to run Jupyterbook in
repo
and I wantnotebooks/
to be injupyterlite_contents
.jupyterlite_contents = ["book/notebooks"]
,glob
in 1. will be able to find it since for glob, the root dir isrepo
, but whenjupyter lite build
runs in 2., since its cwd isbook
, it won't findbook/notebooks
and the build will fail.jupyterlite_contents = ["notebooks"]
instead,glob
in 1. won't find it, sot it will silently remove it from the list. The build will succeed but thenotebook
won't be picked up.Either way, I can't get
notebook
in my build if it's not run fromapp.srcdir
.A simple fix would be to set
glob
'srootdir
parameter tosrc.appdir
. It would still allow adding paths outside of the appdir using..
. I can send a PR as soon as I have you go, or as soon as we figure out another solution if this one doesn't work, as I am very interested in having this fixed :-)The text was updated successfully, but these errors were encountered: