@@ -20,33 +20,10 @@ __ https://jupyter.readthedocs.io/en/latest/contributing/content-contributor.htm
2020Setting Up a Development Environment
2121------------------------------------
2222
23- Installing Node.js and npm
24- ^^^^^^^^^^^^^^^^^^^^^^^^^^
25-
26- Building the Notebook from its GitHub source code requires some tools to
27- create and minify JavaScript components and the CSS,
28- specifically Node.js and Node's package manager, ``npm ``.
29- It should be node version ≥ 6.0.
30-
31- If you use ``conda ``, you can get them with::
32-
33- conda install -c conda-forge nodejs
34-
35- If you use `Homebrew <https://brew.sh/ >`_ on Mac OS X::
36-
37- brew install node
38-
39- Installation on Linux may vary, but be aware that the `nodejs ` or `npm ` packages
40- included in the system package repository may be too old to work properly.
41-
42- You can also use the installer from the `Node.js website <https://nodejs.org >`_.
43-
44-
4523Installing the Jupyter Notebook
4624^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4725
48- Once you have installed the dependencies mentioned above, use the following
49- steps::
26+ Use the following steps::
5027
5128 pip install --upgrade setuptools pip
5229 git clone https://github.com/jupyter/notebook
@@ -77,46 +54,22 @@ running other instances of Jupyter Notebook. You can try the following steps:
77541. Uninstall all instances of the notebook package. These include any installations you made using
7855 pip or conda.
79562. Run ``python3 -m pip install -e . `` in the notebook repository to install the notebook from there.
80- 3. Run ``npm run build `` to make sure the Javascript and CSS are updated and compiled.
81- 4. Launch with ``python3 -m notebook --port 8989 ``, and check that the browser is pointing to ``localhost:8989 ``
57+ 3. Launch with ``python3 -m notebook --port 8989 ``, and check that the browser is pointing to ``localhost:8989 ``
8258 (rather than the default 8888). You don't necessarily have to launch with port 8989, as long as you use
8359 a port that is neither the default nor in use, then it should be fine.
84- 5. Verify the installation with the steps in the previous section.
85-
86-
87- Rebuilding JavaScript and CSS
88- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
89-
90- There is a build step for the JavaScript and CSS in the notebook.
91- To make sure that you are working with up-to-date code, you will need to run
92- this command whenever there are changes to JavaScript or LESS sources::
93-
94- npm run build
60+ 4. Verify the installation with the steps in the previous section.
9561
96- **IMPORTANT: ** Don't forget to run ``npm run build `` after switching branches.
97- When switching between branches of different versions (e.g. ``4.x `` and
98- ``master ``), run ``pip install -e . ``. If you have tried the above and still
99- find that the notebook is not reflecting the current source code, try cleaning
100- the repo with ``git clean -xfd `` and reinstalling with ``pip install -e . ``.
62+ If you have tried the above and still find that the notebook is not reflecting the current source code,
63+ try cleaning the repo with ``git clean -xfd `` and reinstalling with ``pip install -e . ``.
10164
102- Development Tip
103- """""""""""""""
10465
105- When doing development, you can use this command to automatically rebuild
106- JavaScript and LESS sources as they are modified::
107-
108- npm run build:watch
109-
110- Git Hooks
111- """""""""
112-
113- If you want to automatically update dependencies and recompile JavaScript and
114- CSS after checking out a new commit, you can install post-checkout and
115- post-merge hooks which will do it for you::
66+ Modifying the JavaScript and CSS
67+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11668
117- git-hooks/install-hooks.sh
69+ The build process for this version of notebook grabs the static assets
70+ from the nbclassic package. Frontend changes should be made in the `nbclassic repository `_.
11871
119- See `` git-hooks/README.md `` for more details.
72+ .. _ nbclassic repository : https://github.com/jupyter/nbclassic
12073
12174
12275Running Tests
@@ -137,27 +90,6 @@ If you want coverage statistics as well, you can run::
13790
13891 py.test --cov notebook -v --pyargs notebook
13992
140- JavaScript Tests
141- ^^^^^^^^^^^^^^^^
142-
143- To run the JavaScript tests, you will need to have PhantomJS and CasperJS
144- installed::
145-
146- npm install -g casperjs phantomjs-prebuilt
147-
148- Then, to run the JavaScript tests::
149-
150- python -m notebook.jstest [group]
151-
152- where ``[group] `` is an optional argument that is a path relative to
153- ``notebook/tests/ ``.
154- For example, to run all tests in ``notebook/tests/notebook ``::
155-
156- python -m notebook.jstest notebook
157-
158- or to run just ``notebook/tests/notebook/deletecell.js ``::
159-
160- python -m notebook.jstest notebook/deletecell.js
16193
16294
16395Building the Documentation
0 commit comments