mirror of
https://github.com/jupyter/notebook.git
synced 2024-11-21 01:11:21 +08:00
Flesh out development installation instructions
This commit is contained in:
parent
887e0dd154
commit
50c365c58c
@ -1,3 +1,69 @@
|
||||
# Contributing
|
||||
|
||||
We follow the [IPython Contributing Guide](https://github.com/ipython/ipython/blob/master/CONTRIBUTING.md).
|
||||
|
||||
For development installation instructions, see the [README](README.md#dev-quickstart).
|
||||
|
||||
## Managing static files
|
||||
|
||||
The notebook relies on static dependencies (which are installed with Bower), its own minified JavaScript, and CSS compiled from LESS.
|
||||
|
||||
### Static dependencies
|
||||
|
||||
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.
|
||||
|
||||
### Minified JavaScript
|
||||
|
||||
To compile the minified JavaScript, run:
|
||||
|
||||
python setup.py js
|
||||
|
||||
You can also run the notebook server without relying on the minified JavaScript by passing the `--NotebookApp.ignore_minified_js=True` flag when launching the notebook.
|
||||
|
||||
### Compiling CSS
|
||||
|
||||
To compile the CSS from LESS, run:
|
||||
|
||||
python setup.py css
|
||||
|
||||
### Git hooks
|
||||
|
||||
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](git-hooks/README.md) for more details.
|
||||
|
||||
## Running tests
|
||||
|
||||
### JavaScript tests
|
||||
|
||||
To run the JavaScript tests, you will need to have PhantomJS and CasperJS installed:
|
||||
|
||||
npm install -g casperjs phantomjs@1.9.18
|
||||
|
||||
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
|
||||
|
||||
### Python tests
|
||||
|
||||
To run Python tests, run:
|
||||
|
||||
nosetests notebook
|
||||
|
||||
If you want coverage statistics as well, you can run:
|
||||
|
||||
nosetests --with-coverage --cover-package=notebook notebook
|
||||
|
@ -42,6 +42,8 @@ For a local installation, make sure you have [pip installed](https://pip.readthe
|
||||
_NOTE_: For Debian/Ubuntu systems, if you're installing the system node you need
|
||||
to use the 'nodejs-legacy' package and not the 'node' package.
|
||||
|
||||
For more detailed development install instructions (e.g. recompiling javascript and css, running tests), please see the [contributing guide](CONTRIBUTING.md).
|
||||
|
||||
### Ubuntu Trusty
|
||||
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user