Open psychemedia opened 2 years ago
A good example extension for this might be https://github.com/jupyterlab-contrib/jupyterlab-filesystem-access eg in context of https://github.com/jupyterlite/jupyterlite/pull/603 .
Looks like it's already documented in the README?
https://github.com/jupyterlite/demo#deploy-a-new-version-of-jupyterlite
I tried that locally, adding jupyterlab_filesystem_access
to my requirements.txt
and running jupyter lite build --contents content
, then eg jupyter lite serve --port 8002
but I don't see the extension working in JupyterLite? So I figured there's maybe a step I'm missing?
I also note the README for the jupyterlab_filesystem_access
suggests "[t]he main motivation for this extension is to give access to local files in JupyterLite" so it might be appropriate to give a Github Pages / JupyterLite demo there, along with minimum docs for what folk need to do to enable the extension in their own JupyterLite distribution?
Hmm... so when I add the files to requirements in a demo Github repo site, it works. Does the JupyterLite builder pick up extensions that are installed in a base JupyterLab environment? Could it be looking to the wrong path on my local install for what extensions to include?
I tried that locally, adding
jupyterlab_filesystem_access
to myrequirements.txt
and runningjupyter lite build --contents content
, then egjupyter lite serve --port 8002
but I don't see the extension working in JupyterLite? So I figured there's maybe a step I'm missing?
You need to reinstall the dependencies so they are part of the environment.
JupyterLite picks them up from the env prefix by default, see the docs: https://jupyterlite.readthedocs.io/en/latest/configuring.html#environment-extensions
it might be appropriate to give a Github Pages / JupyterLite demo there
There is one: https://jupyterlab-filesystem-access.readthedocs.io/en/latest/#try-it-online
Does the JupyterLite builder pick up extensions that are installed in a base JupyterLab environment?
Yes they need to be installed, see the docs: https://jupyterlite.readthedocs.io/en/latest/configuring.html#environment-extensions
Or you use direct links to the tarballs / wheels with ignore_sys_prefix
, like in https://github.com/jupyterlite/jupyterlite/tree/main/examples
JupyterLite picks them up from the env prefix by default, see the docs:
yes, that's what I'm having the issue with locally. My local JupyterLab install is running with extensions and they are not being picked up by JupyterLab. I think there are several paths that extension can sit on and JupyterLite build does not seem to inspect them all?
The JupyterLite demo currently shows how to add custom content to the site, as well as additional app config settings.
It would be useful for a documented demo of how to add a custom extension, eg from a pre-built wheel.