Skip to content
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

Add support for RISE slides in JupyterLab #1126

Merged
merged 1 commit into from
Sep 16, 2023

Conversation

fcollonval
Copy link
Contributor

@fcollonval fcollonval commented Sep 12, 2023

This PR:

  • adds support for jupyterlab-rise
  • clean some commented code
  • fix setting metadata when modified for JupyterLab 4+

FYI @parmentelat in JupyterLab 4, metadata obtained are a copy of the document metadata. So modifying them required to explicitly call setMetadata with the new value.

@mwouts
Copy link
Owner

mwouts commented Sep 12, 2023

Thank you @fcollonval , this looks great! I plan to give a try to this in the coming days (or next week-end), is that fine with you? Also, are you able to build the package locally? (I am afraid that I am not anymore... I've been using rc releases on pypi, but it would make testing easier if I could recover local builds :) )

@parmentelat
Copy link
Contributor

FYI @parmentelat in JupyterLab 4, metadata obtained are a copy of the document metadata. So modifying them required to explicitly call setMetadata with the new value.

thanks @fcollonval for pointing this out, I'll keep it in mind :)

@fcollonval
Copy link
Contributor Author

Thank you @fcollonval , this looks great! I plan to give a try to this in the coming days (or next week-end), is that fine with you? Also, are you able to build the package locally? (I am afraid that I am not anymore... I've been using rc releases on pypi, but it would make testing easier if I could recover local builds :) )

I succeed to build the wheel with BUILD_JUPYTERLAB_EXTENSION=1 python setup.py bdist_wheel executed in the root folder with nodejs 18 and

Pip list Package Version Editable project location ----------------------------- --------- ---------------------------------- alabaster 0.7.13 anyio 3.7.1 argon2-cffi 23.1.0 argon2-cffi-bindings 21.2.0 arrow 1.2.3 asttokens 2.2.1 async-lru 2.0.4 attrs 23.1.0 Babel 2.12.1 backcall 0.2.0 backports.functools-lru-cache 1.6.5 beautifulsoup4 4.12.2 black 23.7.0 bleach 6.0.0 Brotli 1.1.0 build 0.7.0 cached-property 1.5.2 certifi 2023.7.22 cffi 1.15.1 cfgv 3.4.0 charset-normalizer 3.2.0 click 8.1.7 comm 0.1.4 coverage 7.3.0 debugpy 1.6.8 decorator 5.1.1 defusedxml 0.7.1 deprecation 2.1.0 distlib 0.3.7 docutils 0.20.1 entrypoints 0.4 exceptiongroup 1.1.3 executing 1.2.0 fastjsonschema 2.18.0 filelock 3.12.3 flake8 6.1.0 fqdn 1.5.1 gitdb 4.0.10 GitPython 3.1.34 identify 2.5.27 idna 3.4 imagesize 1.4.1 importlib-metadata 6.8.0 importlib-resources 6.0.1 iniconfig 2.0.0 ipykernel 6.25.2 ipython 8.15.0 ipython-genutils 0.2.0 isoduration 20.11.0 isort 5.12.0 jedi 0.19.0 Jinja2 3.1.2 json5 0.9.14 jsonpointer 2.0 jsonschema 4.19.0 jsonschema-specifications 2023.7.1 jupyter_client 7.4.9 jupyter_core 5.3.1 jupyter-events 0.7.0 jupyter-lsp 2.2.0 jupyter_packaging 0.12.3 jupyter-server 1.24.0 jupyter_server_terminals 0.4.4 jupyterlab 3.3.4 jupyterlab-pygments 0.2.2 jupyterlab_rise 0.3.0 jupyterlab_server 2.24.0 jupytext 1.15.1 /home/fcollonval/projects/jupytext markdown-it-py 3.0.0 MarkupSafe 2.1.3 matplotlib-inline 0.1.6 mccabe 0.7.0 mdit-py-plugins 0.4.0 mdurl 0.1.2 mistune 3.0.1 mypy-extensions 1.0.0 nbclassic 0.5.6 nbclient 0.8.0 nbconvert 7.8.0 nbformat 5.9.2 nest-asyncio 1.5.6 nodeenv 1.8.0 notebook 6.5.5 notebook_shim 0.2.3 overrides 7.4.0 packaging 23.1 pandocfilters 1.5.0 parso 0.8.3 pathspec 0.11.2 pep517 0.13.0 pexpect 4.8.0 pickleshare 0.7.5 pip 23.2.1 pkgutil_resolve_name 1.3.10 platformdirs 3.10.0 pluggy 1.3.0 pre-commit 3.4.0 prometheus-client 0.17.1 prompt-toolkit 3.0.39 psutil 5.9.5 ptyprocess 0.7.0 pure-eval 0.2.2 pycodestyle 2.11.0 pycparser 2.21 pyflakes 3.1.0 Pygments 2.16.1 PySocks 1.7.1 pytest 7.4.1 pytest-cov 4.1.0 pytest-randomly 3.15.0 python-dateutil 2.8.2 python-json-logger 2.0.7 pytz 2023.3 PyYAML 6.0.1 pyzmq 24.0.1 referencing 0.30.2 requests 2.31.0 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rpds-py 0.10.2 Send2Trash 1.8.2 setuptools 68.1.2 six 1.16.0 smmap 5.0.0 sniffio 1.3.0 snowballstemmer 2.2.0 soupsieve 2.5 Sphinx 7.2.5 sphinx-gallery 0.7.0 sphinxcontrib-applehelp 1.0.7 sphinxcontrib-devhelp 1.0.5 sphinxcontrib-htmlhelp 2.0.4 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.6 sphinxcontrib-serializinghtml 1.1.9 stack-data 0.6.2 terminado 0.17.1 tinycss2 1.2.1 toml 0.10.2 tomli 2.0.1 tomlkit 0.12.1 tornado 6.3.3 traitlets 5.9.0 typing_extensions 4.7.1 typing-utils 0.1.0 uri-template 1.3.0 urllib3 2.0.4 virtualenv 20.24.4 wcwidth 0.2.6 webcolors 1.13 webencodings 0.5.1 websocket-client 1.6.2 wheel 0.41.2 zipp 3.16.2

@fcollonval
Copy link
Contributor Author

As the workflow build does create the sdist and wheel on the CI, I can push a commit uploading those artifacts as job artifacts. So it will be easier to test them locally by downloading the package from GitHub.

@mwouts
Copy link
Owner

mwouts commented Sep 16, 2023

Hey @fcollonval , I have been able to test this, seems to work great! I will package a new release right now.

I had not used RISE for a long time, so it took me some research to find out how to run a quick test. Maybe I would have two quick suggestions for the other potential users of RISE:

  1. What got me started was the example notebook on binder at https://github.com/jupyterlab-contrib/rise, it's a great example so maybe I would suggest to mention it explicitly in the documentation? And then it could help to document how to create a new slide etc with the new jupyterlab extension.
  2. In the RISE documentation at https://rise.readthedocs.io/en/stable/usage.html#jupyterlab indicates that JupyterLab is not yet supported, I guess this can now be revisited!

@mwouts mwouts merged commit c2d6281 into mwouts:main Sep 16, 2023
15 of 18 checks passed
@fcollonval fcollonval deleted the ft/support-lab-rise branch September 18, 2023 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants