Skip to content

Commit a19bdf7

Browse files
committed
Add CONTRIBUTING.md doc
1 parent 04290b9 commit a19bdf7

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

CONTRIBUTING.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Contributing
2+
3+
Contributions to nbresuse are highly welcome!
4+
5+
## Development set up
6+
7+
We recommend using [pipenv](https://docs.pipenv.org/) to make development easier.
8+
9+
1. Clone the git repository:
10+
11+
```bash
12+
git clone https://github.com/yuvipanda/nbresuse
13+
```
14+
15+
2. Create an environment that will hold our dependencies.
16+
17+
```bash
18+
cd nbresuse
19+
pipenv --python 3.6
20+
```
21+
22+
3. Activate the virtual environment that pipenv created for us
23+
24+
```bash
25+
pipenv shell
26+
```
27+
28+
4. Do a dev install of nbresuse and its dependencies
29+
30+
```bash
31+
pip install --editable .
32+
```
33+
34+
5. Install and enable the nbextension for use with Jupyter Classic Notebook.
35+
36+
```bash
37+
jupyter nbextension install --py nbresuse --symlink --sys-prefix
38+
jupyter serverextension enable --py nbresuse --sys-prefix
39+
jupyter nbextension enable --py nbresuse --sys-prefix
40+
```
41+
42+
6. Start a Jupyter Notebook instance, open a new notebook and check out the memory usage
43+
in the top right!
44+
45+
```bash
46+
jupyter notebook
47+
```
48+
49+
7. If you want to test the memory limit display functionality, you can do so by setting
50+
the `MEM_LIMIT` environment variable (in bytes) when starting `jupyter notebook`.
51+
52+
```bash
53+
MEM_LIMIT=$(expr 128 \* 1024 \* 1024) jupyter notebook
54+
```

0 commit comments

Comments
 (0)