-
Notifications
You must be signed in to change notification settings - Fork 142
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
Compatibility with 'percent' notebook format #2942
Comments
Thanks for opening this issue. I'm also fond of percent script and jupytext. Pyodide doesn't handle the notebook formats though, https://github.com/iodide-project/iodide does. Maybe @wlach could transfer it there ( "Transfer issue" button on the bottom right).. |
@westurner interesting had not heard of this before! note that iodide is basically in extreme maintenance mode at the moment |
Wasn't sure what level of resources were currently being contributed to this excellent project. For students, "open a URL in a browser", wait for the initial download, and use local system resources is far more practical than starting with time-consuming environment provisioning on each and every platform or finding the money to run a JupyterHub/BinderHub setup that scales to all students; especially when there are ample resources on the clients for most tasks. Though containers can make provisioning trivial, admin access as a requirement is maybe not practical for all students. If pyiodide (or Jyve) could write to other storage APIs (e.g. Dropbox, GDrive), that would solve for very many students' needs for a better calculator that people actually work with in workplaces. E.g. Khan Academy has ProcessingJS CS exercises and edtech funding. Is pyiodide hostable as static HTML on e.g. GH Pages or a CDN? Could there be pluggable storage and grading API adapters? |
The "percent" notebook format looks similar to the pyodide notebook format [1]. It may be advantageous to adopt the percent format so that pyodide notebooks can be run in other tools? A different solution would be to add "pyodide format" (?) to jupytext.
Jyve (JupyterLab as WASM with pyiodide) does not yet support jupytext and so does not yet support the 'percent' format: pyodide/pyodide#431
From [1] https://jupytext.readthedocs.io/en/latest/formats.html#the-percent-format :
The
percent
formatThe
percent
format is a representation of Jupyter notebooks as scripts, in which all cells are explicitely delimited with a commented double percent sign# %%
. Thepercent
format is currently available for these languages.The format was introduced by Spyder in 2013, and is now supported by many editors, including
Code,
Our implementation of the
percent
format is as follows: cells can havemarkdown
,md
orraw
, omitted for code cells)like in this example:
# %% Optional title [cell type] key="value"
In the
percent
format, our previous example becomes:In the case of Python scripts, Markdown cells do accept multiline comments:
Whereas pyodide format looks like this:
The percent format looks like this:
The text was updated successfully, but these errors were encountered: