@@ -24,10 +24,10 @@ The development version of the server requires `node <https://nodejs.org/en/down
24
24
Once you have installed the dependencies mentioned above, use the following
25
25
steps::
26
26
27
- pip install --upgrade setuptools pip
27
+ pip install --upgrade pip
28
28
git clone https://github.com/jupyter/jupyter_server
29
29
cd jupyter_server
30
- pip install -e ".[dev, test]"
30
+ pip install -e ".[test]"
31
31
32
32
If you are using a system-wide Python installation and you only want to install the server for you,
33
33
you can add ``--user `` to the install commands.
@@ -45,11 +45,10 @@ need to worry too much about your code style.
45
45
As long as your code is valid,
46
46
the pre-commit hook should take care of how it should look.
47
47
`pre-commit ` and its associated hooks will automatically be installed when
48
- you run ``pip install -e ".[dev, test]" ``
48
+ you run ``pip install -e ".[test]" ``
49
49
50
- To install ``pre-commit `` manually, run the following::
50
+ To install ``pre-commit `` hook manually, run the following::
51
51
52
- pip install pre-commit
53
52
pre-commit install
54
53
55
54
@@ -78,9 +77,9 @@ running other instances of Jupyter Server. You can try the following steps:
78
77
79
78
1. Uninstall all instances of the jupyter_server package. These include any installations you made using
80
79
pip or conda
81
- 2. Run ``python3 -m pip install -e . `` in the jupyter_server repository to install the jupyter_server from there
80
+ 2. Run ``python -m pip install -e . `` in the jupyter_server repository to install the jupyter_server from there
82
81
3. Run ``npm run build `` to make sure the Javascript and CSS are updated and compiled
83
- 4. Launch with ``python3 -m jupyter_server --port 8989 ``, and check that the browser is pointing to ``localhost:8989 ``
82
+ 4. Launch with ``python -m jupyter_server --port 8989 ``, and check that the browser is pointing to ``localhost:8989 ``
84
83
(rather than the default 8888). You don't necessarily have to launch with port 8989, as long as you use
85
84
a port that is neither the default nor in use, then it should be fine.
86
85
5. Verify the installation with the steps in the previous section.
@@ -98,36 +97,43 @@ To run the Python tests, use::
98
97
pytest
99
98
pytest examples/simple # to test the examples
100
99
101
- Building the Docs
102
- =================
100
+ You can also run the tests using ``hatch `` without installing test dependencies in your local environment::
101
+
102
+ pip install hatch
103
+ hatch run test:test
103
104
104
- To build the documentation you'll need `Sphinx <http://www.sphinx-doc.org/en/master/ >`_,
105
- `pandoc <https://pandoc.org/ >`_ and a few other packages.
105
+ The command takes any argument that you can give to ``pytest ``, e.g.::
106
106
107
- To install (and activate) a `conda environment `_ named ``jupyter_server_docs ``
108
- containing all the necessary packages (except pandoc), use::
107
+ hatch run test:test -k name_of_method_to_test
109
108
110
- conda env create -f docs/environment.yml
111
- conda activate jupyter_server_docs
109
+ You can also drop into a shell in the test environment by running::
112
110
113
- .. _conda environment :
114
- https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file
111
+ hatch -e test shell
112
+
113
+ Building the Docs
114
+ =================
115
115
116
- If you want to install the necessary packages with ``pip `` instead ::
116
+ Install the docs requirements using ``pip ``::
117
117
118
- pip install -r docs/doc-requirements.txt
118
+ pip install .[doc]
119
119
120
120
Once you have installed the required packages, you can build the docs with::
121
121
122
122
cd docs
123
123
make html
124
124
125
- After that, the generated HTML files will be available at
126
- ``build/html/index.html ``. You may view the docs in your browser.
125
+ You can also run the tests using ``hatch `` without installing test dependencies
126
+ in your local environment.
127
+
128
+ pip install hatch
129
+ hatch run docs:build
127
130
128
- You can automatically check if all hyperlinks are still valid ::
131
+ You can also drop into a shell in the docs environment by running ::
129
132
130
- make linkcheck
133
+ hatch -e docs shell
134
+
135
+ After that, the generated HTML files will be available at
136
+ ``build/html/index.html ``. You may view the docs in your browser.
131
137
132
138
Windows users can find ``make.bat `` in the ``docs `` folder.
133
139
0 commit comments