You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Scan your code for expensive operations (large computations, DOM queries, React re-renders). Have you done your possible to limit their impact? If not, it is going to slow your app down.
64
67
* Can you think of cases where your current code will break? How are you handling errors? Should the user see them as notifications? Should your app try to auto-correct them for them?
65
68
66
-
67
69
## Tests
68
70
69
71
### Running the tests
70
72
71
73
Activate your virtualenv:
74
+
72
75
```commandline
73
76
source venv/bin/activate
74
77
```
75
78
76
79
If needed, install the requirements:
80
+
77
81
```commandline
78
82
pip install -r tests/requirements.txt
79
83
```
80
84
81
-
Run the following tests:
85
+
Install ChromeDriver following the instructions [here (Mac)](https://www.kenst.com/2015/03/installing-chromedriver-on-mac-osx/) or [here (Windows)](http://jonathansoma.com/lede/foundations-2018/classes/selenium/selenium-windows-install/). You must install the version of ChromeDriver that matches your Chrome version.
86
+
87
+
Run the tests using the following command:
88
+
82
89
```commandline
83
-
python -m unittest tests.test_callbacks
84
-
python -m unittest tests.test_interactions
85
-
python -m unittest tests.test_usage
90
+
pytest --headless
86
91
```
87
92
88
93
Look inside the `tests/screenshots` directory to find the images created by the tests. If you have
89
94
Percy configured, run the following test:
95
+
90
96
```commandline
91
97
python -m unittest tests.test_percy_snapshot
92
-
```
98
+
```
93
99
94
100
### Percy
95
101
96
102
Make sure to configure your Percy environment variables correctly:
103
+
97
104
```commandline
98
105
PERCY_BRANCH=local
99
106
PERCY_ENABLED=1
@@ -103,10 +110,12 @@ PERCY_TOKEN=***************
103
110
You can find the token in the [project settings of the Percy project](https://percy.io/plotly/dash-cytoscape/settings). Only members of the Plotly organizations have access to this token.
104
111
105
112
### About the tests
113
+
106
114
The tests are broken down in 3 categories:
107
-
* Callbacks: Tests if the `elements`, `stylesheet` and `layout` properties can be updated correctly by other Dash components using callbacks.
108
-
* Interactions: Tests user interactions such as dragging, clicking, and hovering over nodes, as well as the associated event callbacks.
109
-
* Usage: Tests if all of the usage apps render correctly on start. This does not test callbacks.
115
+
116
+
- Callbacks: Tests if the `elements`, `stylesheet` and `layout` properties can be updated correctly by other Dash components using callbacks.
117
+
- Interactions: Tests user interactions such as dragging, clicking, and hovering over nodes, as well as the associated event callbacks.
118
+
- Usage: Tests if all of the usage apps render correctly on start. This does not test callbacks.
110
119
111
120
Those tests are rendered into images located inside `tests/screenshots`, which are then sent to a Percy build using `tests.test_percy_snapshot`, which creates a Dash app that only serves the content of `tests/screenshots` at different routes, which are then captured by the Percy runner.
112
121
@@ -122,14 +131,19 @@ To publish or create a prerelease:
122
131
2. Bump version numbers in `package.json`, update the [CHANGELOG](CHANGELOG.md), and make a pull request
123
132
3. Once the pull request is merged into master:
124
133
4. Build
134
+
125
135
```
126
-
npm run build:backends
136
+
npm run build:all
127
137
```
138
+
128
139
5. Create distribution tarball
140
+
129
141
```
130
142
python setup.py sdist
131
143
```
144
+
132
145
6. Copy the tarball into a separate folder and try to install it and run the examples:
146
+
133
147
```
134
148
cp dist/dash_cytoscape-x.x.x.tar.gz ../temp
135
149
cp usage.py ../temp
@@ -138,64 +152,77 @@ source venv/bin/activate
138
152
pip install dash_cytoscape-x.x.x.tar.gz
139
153
python usage.py
140
154
```
155
+
141
156
7. If the examples work, then publish:
157
+
142
158
```
143
159
npm publish
144
160
twine upload dist/dash_cytoscape-x.x.x.tar.gz
145
161
```
162
+
146
163
8. Tag your release with git:
164
+
147
165
```
148
166
git tag -a 'vx.x.x' -m 'vx.x.x'
149
167
git push origin master --follow-tags
150
168
```
169
+
151
170
9. Verify that the publish worked by installing it:
171
+
152
172
```
153
173
cd ../temp
154
174
pip install dash-cytoscape==x.x.x
155
175
python usage.py
156
176
```
157
177
158
-
159
178
Make a post in the [Dash Community Forum](https://community.plotly.com/c/dash)
160
-
* Title it `":mega: Announcement! New <Your Feature> - Feedback Welcome"`
161
-
* In the description, link to the PR and any relevant issue(s)
162
-
* Pin the topic so that it appears at the top of the forum for two weeks
179
+
180
+
- Title it `":mega: Announcement! New <Your Feature> - Feedback Welcome"`
181
+
- In the description, link to the PR and any relevant issue(s)
182
+
- Pin the topic so that it appears at the top of the forum for two weeks
**Beginner tip:**_Copy and paste this section as a comment in your PR, then check off the boxes as you go!_
187
+
166
188
### Pre-Merge checklist
167
-
-[ ] The project was correctly built with `npm run build:backends`.
168
-
-[ ] If there was any conflict, it was solved correctly
169
-
-[ ] All changes were documented in CHANGELOG.md.
170
-
-[ ] All tests on CircleCI have passed.
171
-
-[ ] All Percy visual changes have been approved.
172
-
-[ ] Two people have :dancer:'d the pull request. You can be one of these people if you are a Dash Cytoscape core contributor.
189
+
190
+
-[ ] The project was correctly built with `npm run build:all`.
191
+
-[ ] If there was any conflict, it was solved correctly
192
+
-[ ] All changes were documented in CHANGELOG.md.
193
+
-[ ] All tests on CircleCI have passed.
194
+
-[ ] All Percy visual changes have been approved.
195
+
-[ ] Two people have :dancer:'d the pull request. You can be one of these people if you are a Dash Cytoscape core contributor.
173
196
174
197
### Merge step
175
-
1. Make sure to *Squash and Merge* your contribution if you have created multiple commits to change a specific feature.
176
-
2. Make sure to *Rebase and Merge* if you added many different features, and need to contribute multiple different commits.
198
+
199
+
1. Make sure to _Squash and Merge_ your contribution if you have created multiple commits to change a specific feature.
200
+
2. Make sure to _Rebase and Merge_ if you added many different features, and need to contribute multiple different commits.
177
201
178
202
### Post-Merge checklist
179
-
-[ ] You have tagged the release using `git tag v<version_number>`_(for the contributor merging the PR)_.
180
-
-[ ] You have pushed this tag using `git push <tag_name>`_(for the contributor merging the PR)_.
181
-
-[ ] You have deleted the branch.
203
+
204
+
-[ ] You have tagged the release using `git tag v<version_number>`_(for the contributor merging the PR)_.
205
+
-[ ] You have pushed this tag using `git push <tag_name>`_(for the contributor merging the PR)_.
206
+
-[ ] You have deleted the branch.
182
207
183
208
### Pre-Release checklist
184
-
-[ ] Everything in the Pre-Merge checklist is completed.
185
-
-[ ]`git remote show origin` shows you are in the correct repository.
186
-
-[ ]`git branch` shows that you are on the expected branch.
187
-
-[ ]`git status` shows that there are no unexpected changes.
188
-
-[ ] Both `package.json` and `dash_cytoscape/package.json` versions have been correctly updated.
209
+
210
+
-[ ] Everything in the Pre-Merge checklist is completed.
211
+
-[ ]`git remote show origin` shows you are in the correct repository.
212
+
-[ ]`git branch` shows that you are on the expected branch.
213
+
-[ ]`git status` shows that there are no unexpected changes.
214
+
-[ ] Both `package.json` and `dash_cytoscape/package.json` versions have been correctly updated.
189
215
190
216
### Release Step
217
+
191
218
Complete the "Publishing" section.
192
219
193
220
### Post-Release checklist
194
-
-[ ] Step 1 and 2 of Post-merge checklist are completed.
195
-
-[ ] You have closed all issues that this pull request solves, and commented the new version number users should install.
196
-
-[ ] If significant enough, you have created an issue about documenting the new feature or change and you have added it to the [Documentation] project.
197
-
-[ ] You have created a pull request in [Dash Docs] with the new release of your feature by editing that project's [`requirements.txt` file](https://github.com/plotly/dash-docs/blob/master/requirements.txt).
198
221
222
+
-[ ] Step 1 and 2 of Post-merge checklist are completed.
223
+
-[ ] You have closed all issues that this pull request solves, and commented the new version number users should install.
224
+
-[ ] If significant enough, you have created an issue about documenting the new feature or change and you have added it to the [Documentation] project.
225
+
-[ ] You have created a pull request in [Dash Docs] with the new release of your feature by editing that project's [`requirements.txt` file](https://github.com/plotly/dash-docs/blob/master/requirements.txt).
199
226
200
227
## Financial Contributions
201
228
@@ -205,7 +232,7 @@ Dash, and many of Plotly's open source products, have been funded through direct
205
232
[Dash HTML Components]: https://github.com/plotly/dash-html-components
206
233
[write your own components]: https://dash.plotly.com/plugins
Copy file name to clipboardExpand all lines: dash_cytoscape/metadata.json
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -880,6 +880,17 @@
880
880
"value": "false",
881
881
"computed": false
882
882
}
883
+
},
884
+
"clearOnUnhover": {
885
+
"type": {
886
+
"name": "bool"
887
+
},
888
+
"required": false,
889
+
"description": "If set to True, mouseoverNodeData and mouseoverEdgeData will be cleared on unhover.\nIf set to False, the value of mouseoverNodeData and mouseoverEdgeData will be the last\nNode or Edge hovered over",
0 commit comments