We follow the IPython Contributing Guide.
For development installation instructions, see the README.
The notebook relies on static dependencies (which are installed with Bower), its own minified JavaScript, and CSS compiled from LESS.
To install the static dependencies, run:
python setup.py jsdeps
You can also pass a -f
flag to this command to force Bower to run, if necessary.
To compile the JavaScript, run:
npm run build:js
To compile the CSS from LESS, run:
python setup.py css
If you want to automatically update dependencies, recompile the JavaScript, and recompile the CSS after checking out a new commit, you can install post-checkout and post-merge hooks which will do it for you:
./git-hooks/install-hooks.sh
See the git-hooks readme for more details.
To run the JavaScript tests, you will need to have PhantomJS and CasperJS installed:
npm install -g casperjs [email protected]
Then, to run the JavaScript tests:
python -m notebook.jstest [group]
where [group]
is an optional argument that is a path relative to notebook/tests
. For example, to run all tests in notebook/tests/notebook
:
python -m notebook.jstest notebook
or to run just notebook/tests/notebook/deletecell.js
:
python -m notebook.jstest notebook/deletecell.js
To run Python tests, run:
nosetests notebook
If you want coverage statistics as well, you can run:
nosetests --with-coverage --cover-package=notebook notebook