Clean up Jupyterlite support
Support for Jupyterlite was added for #458 but this was done before things like open and filesystem access were supported in Jupyterlite. As a result, the implementation (mainly related to the Notebook class and downloading/storing tests) should be cleaned up. (See #458 for details.)
@chrispyles I finally got back here. I am running into the "dill" import problem you spoke about in #458. It looked like you found a way through this problem.
import micropip
await micropip.install('otter-grader==4.3.1')
Ideas?
@sean-morris what errors are you getting specifically? I am able to install and import otter.Notebook on Jupyterlite successfully.
@chrispyles
I get this error:

Trying to run this cell:
# The pip install can take a minute
import micropip
await micropip.install('otter-grader==4.3.1')
# Initialize Otter
import otter
grader = otter.Notebook("hw09.ipynb")
On the Pyodide kernel from the distribution on the jupyterlite site
Thanks
It looks like Otter's method for determining whether it is running on Jupyterlite has been broken by a change to the interpreter. I will add a fix but in the mean time you will need to tell otter.Notebook that it is running on Jupyterlite manually. If this is a notebook generated by Otter Assign, add runs_on: jupyterlite to the assignment config. If not, set jupyterlite=True in otter.Notebook(): otter.Notebook("hw09.ipynb", jupyterlite=True).
It looks like Otter's method for determining whether it is running on Jupyterlite has been broken by a change to the interpreter. I will add a fix but in the mean time you will need to tell
otter.Notebookthat it is running on Jupyterlite manually. If this is a notebook generated by Otter Assign, addruns_on: jupyterliteto the assignment config. If not, setjupyterlite=Trueinotter.Notebook():otter.Notebook("hw09.ipynb", jupyterlite=True).
Thanks @chrispyles this is perfect