-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make otter-grader installable in JupyterLite #458
Comments
@jptio I think |
I haven't checked the code base yet, but is Could otter-grader still be able to run without it, which means some functionalities might not be available? Or is it part of the core library and is then a hard-requirement? Nevertheless it would be useful to be able to install |
nbconvert isn't required for the basic functionality. It would be possible to refactor otter to disable certain features in environments without nbconvert installed. |
@chrispyles that would be lovely! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi @chrispyles just wanted to bump this issue one more time. We were just chatting how cool it would be to demo Data 8 at national workshop in June. |
@yuvipanda @jtpio I've removed the nbconvert issue in this branch but now when trying to install in jupyterlite I'm getting an issue with click which I suspect is being caused by a dependency because Otter doesn't pin click to a specific version. Any ideas on how to resolve this?
Here's the wheel I tried to install: https://raw.githubusercontent.com/chrispyles/example-workshop-2/main/otter_grader-3.2.1-py3-none-any.whl |
Also, the above error resulted from installing with
|
@chrispyles do you know which dependency brings Maybe trying to explicitly install import micropip
await micropip.install('click<=8.0.4')
await micropip.install('https://raw.githubusercontent.com/chrispyles/example-workshop-2/main/otter_grader-3.2.1-py3-none-any.whl', keep_going=True) Getting the following when trying on https://jupyterlite.github.io/demo/lab/index.html: |
@jtpio I don't know which dependency requires |
You can do `pip show pyzmq`. piptree and condatree might be helpful here too.
- https://pypi.org/project/pip-tree/
- https://github.com/rvalieris/conda-tree
|
According to pip-tree, it looks like However, when I tried to import otter, I'm getting an error being caused by importing
|
This might be because JupyterLite handles file I/O differently from JupyterLab, see e.g. jupyterlite/jupyterlite#119 and the issues linked there. It is possible that disabling logging or trying out this extension https://github.com/jupyterlab-contrib/jupyterlab-filesystem-access could help, but I am not sure about this so let's see if there are other suggestions. |
@jtpio ok I've managed to get otter to be importable by disabling logging but the next task is a bit more difficult. I'm working on adding a way to download test files on demand but I'm getting an SSLError when trying to use the
|
Ah unfortunately Mind pointing at the code doing the request, to see if there is something to do about it? Thanks! Also @chrispyles are you iterating in a fork of |
OK, I'll take a look at those. Here's the code making the request. My plan is to make the same package work in both environments. We've already got some features that are disabled/different for Colab, so I'm bootstrapping the system we use for telling whether a user is on Colab (by checking the interpreter returned by |
Got it working with |
@jtpio is there a way to access the notebook file with something like |
OK so I've just merged #489 which adds the fixes for Jupyerlite and some new features related to it. Going to leave this issue open for now though since I still need to add these changes to the documentation. The new changes will be included in the 1st beta of v4 which should be out before the workshop in June. |
wow this sounds great @chrispyles!
Not yet. Accessing content from Python notebook is still a bit clunky for now, but should hopefully be improved at some point (tracked in jupyterlite/jupyterlite#315). |
FYI @chrispyles the latest JupyterLite release added support for accessing files from the Python kernel. More info in:
Probably this will make it easier for using |
Thanks for the update @jtpio. I've just merged in the docs updates + other related updates from #496 so we have an initial implementation of jupyterlite support ready for the 1st beta of otter v4. I'm going to leave this open though so that we can use it to track an update of the initial implementation to make use of the filesystem access you added. |
OK sounds good! |
Since the initial impl is done closing this issue in favor of #511 (which will be used to track the tech debt reduction I discussed above) so that this issue can stay in the v4.0.0 milestone. |
Is your feature request related to a problem? Please describe.
jupyterlite is a full blown scientific python environment running entirely in your browser, no server required! You can try a demo here.
If you try to install
otter-grader
with:It'll fails, trying to install the
pypdf2
package. JupyterLite can only install pure python packages (other than the compiled packages it comes with, such as numpy, pandas, etc). So these packages will need to be made optional wherever possible.Describe the solution you'd like
Figure out what are the required packages for our user functionality, and try making everything else optional.
Describe alternatives you've considered
Additional context
/cc @ericvd-ucb who really wants this, and @jptio the core dev of jupyterlite.
The text was updated successfully, but these errors were encountered: