Spit shine for Jupyter notebooks 🧽✨
ΠŸΠ΅Ρ€Π΅ΠΉΡ‚ΠΈ ΠΊ Ρ„Π°ΠΉΠ»Ρƒ
Andrew Head b0082f2421 Log: Log to Clarence machine, add setting for user email 2019-02-22 16:24:37 -08:00
.github/ISSUE_TEMPLATE Update issue templates 2018-12-29 15:15:35 -08:00
docs Website: Added more project details 2019-01-03 13:40:33 -08:00
schema Log: Log to Clarence machine, add setting for user email 2019-02-22 16:24:37 -08:00
src Log: Log to Clarence machine, add setting for user email 2019-02-22 16:24:37 -08:00
style shrink padding 2018-08-29 20:35:50 -07:00
.gitignore Support persistent history for multiple notebooks in Jupyter Lab 2019-02-11 19:00:02 -08:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2018-12-29 16:04:26 -08:00
LICENSE Initial commit 2018-10-08 16:32:13 -07:00
README.md Log: Log to Clarence machine, add setting for user email 2019-02-22 16:24:37 -08:00
azure-pipelines.yml Revert "Deleted azure-pipelines.yml" 2018-10-08 22:41:17 +00:00
package.json Log: Log to Clarence machine, add setting for user email 2019-02-22 16:24:37 -08:00
tsconfig.json Lab: Update highlighting and precise cell slicing 2018-12-15 16:54:23 -08:00
webpack.config.js use custom loader to load parser3.js as text file 2018-08-15 16:27:03 -07:00

README.md

Code Gathering Tools

Tool for gathering, recalling, comparing implicit versions of code in Jupyter Lab. Read the paper [here](dead link).

Download the Jupyter Lab extension

# This download link is currently dead
jupyter labextension install gathering-tools

Development

For a development install (requires npm version 4 or later), do the following in the repository directory:

npm install                   # download dependencies
jupyter labextension link .   # install this package in Jupyter Lab
jlpm run watch                # automatically recompile sources
jupyter lab --watch           # launch Jupyter Lab, automatically re-load extension

These setup instructions have been successfully completed with Node v9.5.0.

Upload the extension

npm login
npm publish --access=restricted  # make this public eventually

Pre-alpha Jupyter notebook version

This project was initially developed as a Jupyter notebook extension. It is not being maintained, as it requires access to the internal API, including parts that change across minor versions. Still, if you want to build and install the notebook version, run these commands:

npm run build
npm run build_nb_extension
npm run install_nb_extension

Troubleshooting

The extension UI doesn't get loaded

Sometimes you might reload the page and see that the buttons on the page are missing. I haven't been able to track the cause of the issue. This Stack Overflow post suggests the issue might be with circular require dependencies. The problem has disappeared when I have:

  • Deleted the virtual environment containing Jupyter, and installing it globally, or
  • Removed what I thought might be circular dependencies in the project

But I don't know if either of these really fixed the issue. They're worth trying if the gathering UI disappears.

Then run jupyter notebook and the extension will be running.

500 message when launching Jupyter notebook

Install these versions of Jupyter notebook and dependencies to see something working, before trying out other versions:

nbconvert==5.3.1
nbformat==4.4.0
notebook==5.6.0

Backend (logging) extension (optional)

If you want to add logging to the project, look in the src/nb/python directory. This Python plugin needs to be installed to receive logging requests and save them to file (~/.jupyter/events.txt). To register this Python extension in Jupyter notebook or lab, see this guide: https://jupyter-notebook.readthedocs.io/en/latest/extending/handlers.html. As of the time of this writing, installation involves:

pip install portalocker  # dependency for this package
cd src/nb/python
python setup.py install  # build this package
jupyter serverextension enable --py gather_logger  # enable the package

We aren't yet including the frontend extension in the server extension, nor do we have a good way to develop the plugin in development mode yet. To do either of these two things, follow the instructions here: https://jupyter-notebook.readthedocs.io/en/latest/examples/Notebook/Distributing%20Jupyter%20Extensions%20as%20Python%20Packages.html .