Skip to content

Commit 7bf2982

Browse files
committed
adapted docs
1 parent e3826ea commit 7bf2982

File tree

5 files changed

+56
-26
lines changed

5 files changed

+56
-26
lines changed

docs/dev_notes/img/test_config.png

82 KB
Loading
-356 KB
Loading

docs/dev_notes/testing.rst

+30-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,19 @@ with an output looking like this
1818

1919
.. code:: bash
2020
21-
PLACEHOLDER
21+
---------- coverage: platform darwin, python 3.7.3-final-0 -----------
22+
Name Stmts Miss Cover
23+
-----------------------------------------------
24+
netwulf/__init__.py 4 0 100%
25+
netwulf/interactive.py 154 24 84%
26+
netwulf/metadata.py 9 0 100%
27+
netwulf/tests/__init__.py 1 0 100%
28+
netwulf/tests/test_all.py 70 2 97%
29+
netwulf/tools.py 92 1 99%
30+
-----------------------------------------------
31+
TOTAL 330 27 92%
32+
33+
================ 5 passed, 4 warnings in 58.81 seconds ================
2234
2335
If you open a pull request, make sure you ran the tests and copy the test report
2436
as a comment with your pull request like so
@@ -61,6 +73,23 @@ A browser window will be opened with a visualization looking like this.
6173

6274
It will close automatically.
6375

76+
Config
77+
~~~~~~~
78+
79+
The config test starts a visualization with a configuration where each entry differs from its default value.
80+
81+
.. code:: python
82+
83+
T.test_config_adaption()
84+
85+
A browser window will be opened with a visualization looking like this.
86+
87+
.. figure:: img/test_config.png
88+
89+
Posting test
90+
91+
It will close automatically. The test checks wether the returned configuration is equal to the posted configuration.
92+
6493
Reproducibility
6594
~~~~~~~~~~~~~~~
6695

docs/python_api/post_back.rst

+15-14
Original file line numberDiff line numberDiff line change
@@ -87,32 +87,33 @@ which was used to generate this figure will resemble
8787
8888
default_config = {
8989
# Input/output
90-
'zoom': 1.5,
90+
'zoom': 1,
9191
# Physics
92-
'node_charge': -30,
92+
'node_charge': -45,
9393
'node_gravity': 0.1,
94-
'link_distance': 10,
95-
'node_collision': False,
94+
'link_distance': 15,
95+
'link_distance_variation': 0,
96+
'node_collision': True,
9697
'wiggle_nodes': False,
9798
'freeze_nodes': False,
9899
# Nodes
99-
'node_fill_color': '#16a085',
100-
'node_stroke_color': '#000000',
100+
'node_fill_color': '#79aaa0',
101+
'node_stroke_color': '#555555',
101102
'node_label_color': '#000000',
102103
'display_node_labels': False,
103104
'scale_node_size_by_strength': False,
104-
'node_size': 10,
105-
'node_stroke_width': 0.5,
106-
'node_size_unevenness': 0.5,
105+
'node_size': 5,
106+
'node_stroke_width': 1,
107+
'node_size_variation': 0.5,
107108
# Links
108109
'link_color': '#7c7c7c',
109-
'link_width': 5,
110+
'link_width': 2,
110111
'link_alpha': 0.5,
111-
'link_width_unevenness': 0.5,
112+
'link_width_variation': 0.5,
112113
# Thresholding
113-
'display_singleton_nodes': False,
114-
'min_link_weight_percentage': 0,
115-
'max_link_weight_percentage': 100
114+
'display_singleton_nodes': True,
115+
'min_link_weight_percentile': 0,
116+
'max_link_weight_percentile': 1
116117
}
117118
118119
If the visualization was started from a Jupyter notebook, a picture of the stylized

netwulf/interactive.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -196,35 +196,35 @@ def visualize(network,
196196
197197
default_config = {
198198
# Input/output
199-
'zoom': 1.5,
199+
'zoom': 1,
200200
# Physics
201-
'node_charge': -30,
201+
'node_charge': -45,
202202
'node_gravity': 0.1,
203-
'link_distance': 10,
203+
'link_distance': 15,
204204
'link_distance_variation': 0,
205-
'node_collision': False,
205+
'node_collision': True,
206206
'wiggle_nodes': False,
207207
'freeze_nodes': False,
208208
# Nodes
209-
'node_fill_color': '#16a085',
210-
'node_stroke_color': '#000000',
209+
'node_fill_color': '#79aaa0',
210+
'node_stroke_color': '#555555',
211211
'node_label_color': '#000000',
212212
'display_node_labels': False,
213213
'scale_node_size_by_strength': False,
214-
'node_size': 10,
215-
'node_stroke_width': 0.5,
214+
'node_size': 5,
215+
'node_stroke_width': 1,
216216
'node_size_variation': 0.5,
217217
# Links
218218
'link_color': '#7c7c7c',
219-
'link_width': 5,
219+
'link_width': 2,
220220
'link_alpha': 0.5,
221221
'link_width_variation': 0.5,
222222
# Thresholding
223-
'display_singleton_nodes': False,
223+
'display_singleton_nodes': True,
224224
'min_link_weight_percentile': 0,
225225
'max_link_weight_percentile': 1
226226
}
227-
plot_in_cell_below : bool, default : True
227+
228228
When started from a Jupyter notebook, this will show a
229229
reproduced matplotlib figure of the stylized network
230230
in a cell below. Only works if ``verbose = False``.

0 commit comments

Comments
 (0)