Contributions to nbresuse are highly welcome!
We recommend using pipenv to make development easier.
-
Clone the git repository:
git clone https://github.com/yuvipanda/nbresuse
-
Create an environment that will hold our dependencies.
cd nbresuse pipenv --python 3.6
-
Activate the virtual environment that pipenv created for us
pipenv shell
-
Do a dev install of nbresuse and its dependencies
pip install --editable .
-
Install and enable the nbextension for use with Jupyter Classic Notebook.
jupyter nbextension install --py nbresuse --symlink --sys-prefix jupyter serverextension enable --py nbresuse --sys-prefix jupyter nbextension enable --py nbresuse --sys-prefix
-
Start a Jupyter Notebook instance, open a new notebook and check out the memory usage in the top right!
jupyter notebook
-
If you want to test the memory limit display functionality, you can do so by setting the
MEM_LIMIT
environment variable (in bytes) when startingjupyter notebook
.MEM_LIMIT=$(expr 128 \* 1024 \* 1024) jupyter notebook