Skip to content

Commit 3cb7f12

Browse files
Test Dash table against head of master and release-v1 (plotly#309)
1 parent 9890b72 commit 3cb7f12

File tree

9 files changed

+177
-85
lines changed

9 files changed

+177
-85
lines changed

packages/dash-table/.circleci/config.yml

+96-19
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: 2
22

33
jobs:
4-
"test":
4+
"test-v0":
55
docker:
66
- image: circleci/python:3.6-node-browsers
77
- image: cypress/base:10
@@ -33,12 +33,60 @@ jobs:
3333
name: Install requirements
3434
command: |
3535
. venv/bin/activate
36-
pip install -r requirements.txt --quiet
36+
pip install -r requirements-base.txt --quiet
37+
pip install -r requirements-v0.txt --quiet
38+
39+
- run:
40+
name: Run build:js
41+
command: npm run private::build:js-test
42+
43+
- run:
44+
name: Run build:py
45+
command: |
46+
. venv/bin/activate
47+
npm run private::build:py
48+
49+
- run:
50+
name: Run tests
51+
command: |
52+
. venv/bin/activate
53+
npm run test-v0
54+
55+
56+
"test-v1":
57+
docker:
58+
- image: circleci/python:3.6-node-browsers
59+
- image: cypress/base:10
60+
61+
steps:
62+
- checkout
63+
- restore_cache:
64+
key: deps1-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
65+
- run:
66+
name: Install npm packages
67+
command: npm install
68+
- run:
69+
name: Cypress Install
70+
command: |
71+
$(npm bin)/cypress install
3772
3873
- save_cache:
39-
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}
74+
key: deps1-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
4075
paths:
41-
- "venv"
76+
- node_modules
77+
- /home/circleci/.cache/Cypress
78+
79+
- run:
80+
name: Create virtualenv
81+
command: |
82+
python3 -m venv venv
83+
84+
- run:
85+
name: Install requirements
86+
command: |
87+
. venv/bin/activate
88+
pip install -r requirements-base.txt --quiet
89+
pip install -r requirements-v1.txt --quiet
4290
4391
- run:
4492
name: Run build:js
@@ -54,7 +102,7 @@ jobs:
54102
name: Run tests
55103
command: |
56104
. venv/bin/activate
57-
npm run test
105+
npm run test-v1
58106
59107
60108
"visual-test":
@@ -110,24 +158,21 @@ jobs:
110158
when: always
111159

112160

113-
"python-3.6":
161+
"python-3.6-v0":
114162
docker:
115163
- image: circleci/python:3.6-stretch-browsers
116164

117165
environment:
118166
PERCY_ENABLED: True
119-
PERCY_PROJECT: plotly/dash-table-python
167+
PERCY_PROJECT: plotly/dash-table-python-v0
120168

121169
steps:
122170
- checkout
123171

124172
- run:
125173
name: Inject Percy Environment variables
126174
command: |
127-
echo 'export PERCY_TOKEN="$PERCY_PYTHON_TOKEN"' >> $BASH_ENV
128-
129-
- restore_cache:
130-
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}
175+
echo 'export PERCY_TOKEN="$PERCY_PYTHON_TOKEN_V0"' >> $BASH_ENV
131176
132177
- run:
133178
name: Create virtualenv
@@ -138,12 +183,8 @@ jobs:
138183
name: Install requirements
139184
command: |
140185
. venv/bin/activate
141-
pip install -r requirements.txt --quiet
142-
143-
- save_cache:
144-
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }}
145-
paths:
146-
- "venv"
186+
pip install -r requirements-base.txt --quiet
187+
pip install -r requirements-v0.txt --quiet
147188
148189
- run:
149190
name: Run integration tests
@@ -152,12 +193,48 @@ jobs:
152193
python -m unittest tests.dash.test_integration
153194
154195
196+
"python-3.6-v1":
197+
docker:
198+
- image: circleci/python:3.6-stretch-browsers
199+
200+
environment:
201+
PERCY_ENABLED: True
202+
PERCY_PROJECT: plotly/dash-table-python-v1
203+
204+
steps:
205+
- checkout
206+
207+
- run:
208+
name: Inject Percy Environment variables
209+
command: |
210+
echo 'export PERCY_TOKEN="$PERCY_PYTHON_TOKEN_V1"' >> $BASH_ENV
211+
212+
- run:
213+
name: Create virtualenv
214+
command: |
215+
python3 -m venv venv
216+
217+
- run:
218+
name: Install requirements
219+
command: |
220+
. venv/bin/activate
221+
pip install -r requirements-base.txt --quiet
222+
pip install -r requirements-v1.txt --quiet
223+
224+
- run:
225+
name: Run integration tests
226+
command: |
227+
. venv/bin/activate
228+
python -m unittest tests.dash.test_integration
229+
155230
156231
workflows:
157232
version: 2
158233
build:
159234
jobs:
160-
- "python-3.6"
235+
- "python-3.6-v0"
236+
- "python-3.6-v1"
161237
- "node"
162-
- "test"
238+
- "test-v0"
239+
- "test-v1"
163240
- "visual-test"

packages/dash-table/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [Unreleased]
6+
### Maintenance
7+
- Test with head of both Dash v0.x and Dash v1.x [#20](https://github.com/plotly/dash-core/issues/20)
8+
59
## [3.1.11] - 2018-12-10
610
### Fixed
711
- Selection, navigation, copy from readonly cell [#276](https://github.com/plotly/dash-table/issues/276)

packages/dash-table/dash_table/package-info.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@
2424
"private::wait_dash8083": "wait-on http://localhost:8083",
2525
"private::wait_js": "wait-on http://localhost:8080",
2626
"private::opentests": "cypress open",
27-
"private::runtests": "cypress run --browser chrome",
27+
"private::runtests-v0": "cypress run --browser chrome --spec 'tests/cypress/tests/server/**/*'",
28+
"private::runtests-v1": "cypress run --browser chrome",
2829
"build.watch": "webpack-dev-server --content-base dash_table --mode development",
2930
"build": "run-s private::build:js private::build:py",
3031
"lint": "tslint '{src,demo,tests}/**/*.{js,ts,tsx}' --exclude '**/@Types/*.*'",
31-
"test": "run-p --race private::host* private::runtests",
32+
"test-v0": "run-p --race private::host* private::runtests-v0",
33+
"test-v1": "run-p --race private::host* private::runtests-v1",
3234
"test.visual": "build-storybook && percy-storybook",
3335
"test.visual-local": "build-storybook",
3436
"test.watch": "run-p --race \"private::build:js-test-watch\" --race private::host* private::opentests"

packages/dash-table/package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@
2424
"private::wait_dash8083": "wait-on http://localhost:8083",
2525
"private::wait_js": "wait-on http://localhost:8080",
2626
"private::opentests": "cypress open",
27-
"private::runtests": "cypress run --browser chrome",
27+
"private::runtests-v0": "cypress run --browser chrome --spec 'tests/cypress/tests/server/**/*'",
28+
"private::runtests-v1": "cypress run --browser chrome",
2829
"build.watch": "webpack-dev-server --content-base dash_table --mode development",
2930
"build": "run-s private::build:js private::build:py",
3031
"lint": "tslint '{src,demo,tests}/**/*.{js,ts,tsx}' --exclude '**/@Types/*.*'",
31-
"test": "run-p --race private::host* private::runtests",
32+
"test-v0": "run-p --race private::host* private::runtests-v0",
33+
"test-v1": "run-p --race private::host* private::runtests-v1",
3234
"test.visual": "build-storybook && percy-storybook",
3335
"test.visual-local": "build-storybook",
3436
"test.watch": "run-p --race \"private::build:js-test-watch\" --race private::host* private::opentests"
+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
appdirs==1.4.3
2+
appnope==0.1.0
3+
astroid==2.0.4
4+
attrs==18.2.0
5+
backcall==0.1.0
6+
black==18.6b4
7+
certifi==2018.8.24
8+
chardet==3.0.4
9+
chromedriver-binary==2.41.0
10+
click==6.7
11+
decorator==4.3.0
12+
flake8==3.5.0
13+
Flask==1.0.2
14+
Flask-Compress==1.4.0
15+
gunicorn==19.9.0
16+
idna==2.7
17+
ipdb==0.11
18+
ipython==6.5.0
19+
ipython-genutils==0.2.0
20+
isort==4.3.4
21+
itsdangerous==0.24
22+
jedi==0.12.1
23+
Jinja2==2.10
24+
jsonschema==2.6.0
25+
jupyter-core==4.4.0
26+
lazy-object-proxy==1.3.1
27+
MarkupSafe==1.0
28+
mccabe==0.6.1
29+
nbformat==4.4.0
30+
numpy==1.15.1
31+
pandas==0.23.4
32+
parso==0.3.1
33+
percy==2.0.0
34+
pexpect==4.6.0
35+
pickleshare==0.7.4
36+
plotly==3.2.1
37+
prompt-toolkit==1.0.15
38+
ptyprocess==0.6.0
39+
pycodestyle==2.3.1
40+
pyflakes==1.6.0
41+
Pygments==2.2.0
42+
pylint==2.1.1
43+
python-dateutil==2.7.3
44+
pytz==2018.5
45+
requests==2.19.1
46+
retrying==1.3.3
47+
selenium==3.14.0
48+
simplegeneric==0.8.1
49+
six==1.11.0
50+
toml==0.9.6
51+
traitlets==4.3.2
52+
typed-ast==1.1.0
53+
urllib3==1.23
54+
wcwidth==0.1.7
55+
Werkzeug==0.14.1
56+
wrapt==1.10.11
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
git+git://github.com/plotly/dash@master#egg=dash
2+
git+git://github.com/plotly/dash-core-components@master#egg=dash_core_components
3+
git+git://github.com/plotly/dash-html-components@master#egg=dash_html_components
4+
git+git://github.com/plotly/dash-renderer@master#egg=dash_renderer
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
git+git://github.com/plotly/dash@release-v1#egg=dash
2+
git+git://github.com/plotly/dash-core-components@release-v1#egg=dash_core_components
3+
git+git://github.com/plotly/dash-html-components@release-v1#egg=dash_html_components
4+
git+git://github.com/plotly/dash-renderer@release-v1#egg=dash_renderer

packages/dash-table/requirements.txt

+2-60
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,2 @@
1-
appdirs==1.4.3
2-
appnope==0.1.0
3-
astroid==2.0.4
4-
attrs==18.2.0
5-
backcall==0.1.0
6-
black==18.6b4
7-
certifi==2018.8.24
8-
chardet==3.0.4
9-
chromedriver-binary==2.41.0
10-
click==6.7
11-
dash==0.32.0
12-
dash-core-components==0.40.2
13-
dash-html-components==0.13.2
14-
dash_renderer==0.15.1
15-
decorator==4.3.0
16-
flake8==3.5.0
17-
Flask==1.0.2
18-
Flask-Compress==1.4.0
19-
gunicorn==19.9.0
20-
idna==2.7
21-
ipdb==0.11
22-
ipython==6.5.0
23-
ipython-genutils==0.2.0
24-
isort==4.3.4
25-
itsdangerous==0.24
26-
jedi==0.12.1
27-
Jinja2==2.10
28-
jsonschema==2.6.0
29-
jupyter-core==4.4.0
30-
lazy-object-proxy==1.3.1
31-
MarkupSafe==1.0
32-
mccabe==0.6.1
33-
nbformat==4.4.0
34-
numpy==1.15.1
35-
pandas==0.23.4
36-
parso==0.3.1
37-
percy==2.0.0
38-
pexpect==4.6.0
39-
pickleshare==0.7.4
40-
plotly==3.2.1
41-
prompt-toolkit==1.0.15
42-
ptyprocess==0.6.0
43-
pycodestyle==2.3.1
44-
pyflakes==1.6.0
45-
Pygments==2.2.0
46-
pylint==2.1.1
47-
python-dateutil==2.7.3
48-
pytz==2018.5
49-
requests==2.19.1
50-
retrying==1.3.3
51-
selenium==3.14.0
52-
simplegeneric==0.8.1
53-
six==1.11.0
54-
toml==0.9.6
55-
traitlets==4.3.2
56-
typed-ast==1.1.0
57-
urllib3==1.23
58-
wcwidth==0.1.7
59-
Werkzeug==0.14.1
60-
wrapt==1.10.11
1+
-r requirements-base.txt
2+
-r requirements-v1.txt

packages/dash-table/tests/dash/app_dropdown.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
ID_PREFIX = "app_dropdown"
1414
IDS = {
1515
"dropdown": ID_PREFIX,
16-
"dropdown-by-cell": '{}-row-by-cell'.format(ID_PREFIX)
16+
"dropdown-by-cell": '{}-row-by-cell'.format(ID_PREFIX),
17+
"dropdown-by-cell-deprecated": '{}-deprecated-row-by-cell'.format(ID_PREFIX)
1718
}
1819

1920

@@ -141,7 +142,7 @@ def layout():
141142
html.Div('This example uses a deprecated API, `dropdown_properties`.'),
142143

143144
dash_table.DataTable(
144-
id=IDS['dropdown-by-cell'],
145+
id=IDS['dropdown-by-cell-deprecated'],
145146
data=df_per_row_dropdown.to_dict('rows'),
146147
columns=[
147148
{'id': c, 'name': c}

0 commit comments

Comments
 (0)