|
1 | 1 | Contributing |
2 | 2 | ============ |
3 | 3 |
|
4 | | -This is an instruction of the developer tools that help you contributing. |
5 | | - |
6 | | -Running tests |
7 | | -------------- |
8 | | - |
9 | | -Tests can be with run using |
10 | | - |
11 | | -.. code-block:: bash |
12 | | -
|
13 | | - tox -e tests |
14 | | -
|
15 | | -You can source the test environment of tox after a run using |
16 | | - |
17 | | -.. code-block:: bash |
18 | | -
|
19 | | - source .tox/tests/bin/activate |
20 | | -
|
21 | | -Converting notebook test files |
22 | | -############################## |
23 | | - |
24 | | -The we store the notebooks as converted Python file using `jupytext` for the conversion |
25 | | -for better versioning |
26 | | - |
27 | | -.. code-block:: bash |
28 | | -
|
29 | | - jupytext tests/notebooks/*.py --to ipynb |
30 | | -
|
31 | | -Be aware that when runnng the tests with tox all `*.ipynb` are overwriten by their |
32 | | -corresponding `*.py` file. For example, the file `test_widget_cue_box.ipynb` is |
33 | | -overwritten by the conversion of `test_widget_cue_box.py` when running the test. |
34 | | - |
35 | | - |
36 | | -Running with UI |
37 | | -############### |
38 | | - |
39 | | -We use selenium to test the widgets on user actions (like a button click). To run it in |
40 | | -in the CI where no display is available. We run the browsers in headless model to not |
41 | | -load the UI. For debugging a test however, it is often benificial to see what is |
42 | | -happening in the window. To run the tests with the browser UI please use |
43 | | - |
44 | | -.. code-block:: bash |
45 | | -
|
46 | | - pytest --driver Firefox |
47 | | -
|
48 | | -Port issues |
49 | | -########### |
50 | | - |
51 | | -For the notebook server we fixed the port to 8815, if this port is not available you . |
52 | | -It can happen that notebook process is not properly killed and remains as zombie |
53 | | -process. You can check if a notebook with this port is already running using |
54 | | - |
55 | | -.. code-block:: bash |
56 | | - |
57 | | - jupyter notebook list | grep 8815 |
58 | | -
|
59 | | -or if some process is using it |
60 | | - |
61 | | -.. code-block:: bash |
62 | | -
|
63 | | - netstat -l | grep 8815 |
64 | | -
|
65 | | -Formatting code |
66 | | ---------------- |
67 | | - |
68 | | -Your code can be formatted using |
69 | | - |
70 | | -.. code-block:: bash |
71 | | -
|
72 | | - tox -e format |
73 | | -
|
74 | | -The formatting should fix most issues with linting, but sometimes you need to manually |
75 | | -fix some issues. To run the linter use |
76 | | - |
77 | | -.. code-block:: bash |
78 | | -
|
79 | | - tox -e lint |
80 | | -
|
81 | | -
|
82 | | -Building documentation |
83 | | ----------------------- |
84 | | - |
85 | | -To build the docs please use |
86 | | - |
87 | | -.. code-block:: bash |
88 | | -
|
89 | | - tox -e docs |
90 | | -
|
91 | | -To open the doc with for example firefox you can run |
92 | | - |
93 | | -.. code-block:: bash |
94 | | -
|
95 | | - firefox docs/build/html/index.html |
| 4 | +Please read the `developer documentation <developers.html>`_. |
0 commit comments