-
-
Notifications
You must be signed in to change notification settings - Fork 73
Test Dash table against head of master and release-v1 #309
Changes from all commits
7fd9af9
0d0223f
548cb0f
92a608d
4622c96
f9b3565
bbe7704
8e2e2d2
932d9a5
6e5843c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
version: 2 | ||
|
||
jobs: | ||
"test": | ||
"test-v0": | ||
docker: | ||
- image: circleci/python:3.6-node-browsers | ||
- image: cypress/base:10 | ||
|
@@ -33,12 +33,60 @@ jobs: | |
name: Install requirements | ||
command: | | ||
. venv/bin/activate | ||
pip install -r requirements.txt --quiet | ||
pip install -r requirements-base.txt --quiet | ||
pip install -r requirements-v0.txt --quiet | ||
|
||
- run: | ||
name: Run build:js | ||
command: npm run private::build:js-test | ||
|
||
- run: | ||
name: Run build:py | ||
command: | | ||
. venv/bin/activate | ||
npm run private::build:py | ||
|
||
- run: | ||
name: Run tests | ||
command: | | ||
. venv/bin/activate | ||
npm run test-v0 | ||
|
||
|
||
"test-v1": | ||
docker: | ||
- image: circleci/python:3.6-node-browsers | ||
- image: cypress/base:10 | ||
|
||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: deps1-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }} | ||
- run: | ||
name: Install npm packages | ||
command: npm install | ||
- run: | ||
name: Cypress Install | ||
command: | | ||
$(npm bin)/cypress install | ||
|
||
- save_cache: | ||
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }} | ||
key: deps1-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }} | ||
paths: | ||
- "venv" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not keeping the venv in cache to make sure the latest is installed from git ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes |
||
- node_modules | ||
- /home/circleci/.cache/Cypress | ||
|
||
- run: | ||
name: Create virtualenv | ||
command: | | ||
python3 -m venv venv | ||
|
||
- run: | ||
name: Install requirements | ||
command: | | ||
. venv/bin/activate | ||
pip install -r requirements-base.txt --quiet | ||
pip install -r requirements-v1.txt --quiet | ||
|
||
- run: | ||
name: Run build:js | ||
|
@@ -54,7 +102,7 @@ jobs: | |
name: Run tests | ||
command: | | ||
. venv/bin/activate | ||
npm run test | ||
npm run test-v1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for v1 we run everything (server, standalone w/ React 16, unit tests) |
||
|
||
|
||
"visual-test": | ||
|
@@ -110,24 +158,21 @@ jobs: | |
when: always | ||
|
||
|
||
"python-3.6": | ||
"python-3.6-v0": | ||
docker: | ||
- image: circleci/python:3.6-stretch-browsers | ||
|
||
environment: | ||
PERCY_ENABLED: True | ||
PERCY_PROJECT: plotly/dash-table-python | ||
PERCY_PROJECT: plotly/dash-table-python-v0 | ||
|
||
steps: | ||
- checkout | ||
|
||
- run: | ||
name: Inject Percy Environment variables | ||
command: | | ||
echo 'export PERCY_TOKEN="$PERCY_PYTHON_TOKEN"' >> $BASH_ENV | ||
|
||
- restore_cache: | ||
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }} | ||
echo 'export PERCY_TOKEN="$PERCY_PYTHON_TOKEN_V0"' >> $BASH_ENV | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. v0 and v1 visual tests end up in https://percy.io/plotly/dash-table-python-v0 and https://percy.io/plotly/dash-table-python-v1 |
||
|
||
- run: | ||
name: Create virtualenv | ||
|
@@ -138,12 +183,8 @@ jobs: | |
name: Install requirements | ||
command: | | ||
. venv/bin/activate | ||
pip install -r requirements.txt --quiet | ||
|
||
- save_cache: | ||
key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }} | ||
paths: | ||
- "venv" | ||
pip install -r requirements-base.txt --quiet | ||
pip install -r requirements-v0.txt --quiet | ||
|
||
- run: | ||
name: Run integration tests | ||
|
@@ -152,12 +193,48 @@ jobs: | |
python -m unittest tests.dash.test_integration | ||
|
||
|
||
"python-3.6-v1": | ||
docker: | ||
- image: circleci/python:3.6-stretch-browsers | ||
|
||
environment: | ||
PERCY_ENABLED: True | ||
PERCY_PROJECT: plotly/dash-table-python-v1 | ||
|
||
steps: | ||
- checkout | ||
|
||
- run: | ||
name: Inject Percy Environment variables | ||
command: | | ||
echo 'export PERCY_TOKEN="$PERCY_PYTHON_TOKEN_V1"' >> $BASH_ENV | ||
|
||
- run: | ||
name: Create virtualenv | ||
command: | | ||
python3 -m venv venv | ||
|
||
- run: | ||
name: Install requirements | ||
command: | | ||
. venv/bin/activate | ||
pip install -r requirements-base.txt --quiet | ||
pip install -r requirements-v1.txt --quiet | ||
|
||
- run: | ||
name: Run integration tests | ||
command: | | ||
. venv/bin/activate | ||
python -m unittest tests.dash.test_integration | ||
|
||
|
||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- "python-3.6" | ||
- "python-3.6-v0" | ||
- "python-3.6-v1" | ||
- "node" | ||
- "test" | ||
- "test-v0" | ||
- "test-v1" | ||
- "visual-test" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
appdirs==1.4.3 | ||
appnope==0.1.0 | ||
astroid==2.0.4 | ||
attrs==18.2.0 | ||
backcall==0.1.0 | ||
black==18.6b4 | ||
certifi==2018.8.24 | ||
chardet==3.0.4 | ||
chromedriver-binary==2.41.0 | ||
click==6.7 | ||
decorator==4.3.0 | ||
flake8==3.5.0 | ||
Flask==1.0.2 | ||
Flask-Compress==1.4.0 | ||
gunicorn==19.9.0 | ||
idna==2.7 | ||
ipdb==0.11 | ||
ipython==6.5.0 | ||
ipython-genutils==0.2.0 | ||
isort==4.3.4 | ||
itsdangerous==0.24 | ||
jedi==0.12.1 | ||
Jinja2==2.10 | ||
jsonschema==2.6.0 | ||
jupyter-core==4.4.0 | ||
lazy-object-proxy==1.3.1 | ||
MarkupSafe==1.0 | ||
mccabe==0.6.1 | ||
nbformat==4.4.0 | ||
numpy==1.15.1 | ||
pandas==0.23.4 | ||
parso==0.3.1 | ||
percy==2.0.0 | ||
pexpect==4.6.0 | ||
pickleshare==0.7.4 | ||
plotly==3.2.1 | ||
prompt-toolkit==1.0.15 | ||
ptyprocess==0.6.0 | ||
pycodestyle==2.3.1 | ||
pyflakes==1.6.0 | ||
Pygments==2.2.0 | ||
pylint==2.1.1 | ||
python-dateutil==2.7.3 | ||
pytz==2018.5 | ||
requests==2.19.1 | ||
retrying==1.3.3 | ||
selenium==3.14.0 | ||
simplegeneric==0.8.1 | ||
six==1.11.0 | ||
toml==0.9.6 | ||
traitlets==4.3.2 | ||
typed-ast==1.1.0 | ||
urllib3==1.23 | ||
wcwidth==0.1.7 | ||
Werkzeug==0.14.1 | ||
wrapt==1.10.11 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
git+git://github.com/plotly/dash@master#egg=dash | ||
git+git://github.com/plotly/dash-core-components@master#egg=dash_core_components | ||
git+git://github.com/plotly/dash-html-components@master#egg=dash_html_components | ||
git+git://github.com/plotly/dash-renderer@master#egg=dash_renderer |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
git+git://github.com/plotly/dash@release-v1#egg=dash | ||
git+git://github.com/plotly/dash-core-components@release-v1#egg=dash_core_components | ||
git+git://github.com/plotly/dash-html-components@release-v1#egg=dash_html_components | ||
git+git://github.com/plotly/dash-renderer@release-v1#egg=dash_renderer |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,2 @@ | ||
appdirs==1.4.3 | ||
appnope==0.1.0 | ||
astroid==2.0.4 | ||
attrs==18.2.0 | ||
backcall==0.1.0 | ||
black==18.6b4 | ||
certifi==2018.8.24 | ||
chardet==3.0.4 | ||
chromedriver-binary==2.41.0 | ||
click==6.7 | ||
dash==0.32.0 | ||
dash-core-components==0.40.2 | ||
dash-html-components==0.13.2 | ||
dash_renderer==0.15.1 | ||
decorator==4.3.0 | ||
flake8==3.5.0 | ||
Flask==1.0.2 | ||
Flask-Compress==1.4.0 | ||
gunicorn==19.9.0 | ||
idna==2.7 | ||
ipdb==0.11 | ||
ipython==6.5.0 | ||
ipython-genutils==0.2.0 | ||
isort==4.3.4 | ||
itsdangerous==0.24 | ||
jedi==0.12.1 | ||
Jinja2==2.10 | ||
jsonschema==2.6.0 | ||
jupyter-core==4.4.0 | ||
lazy-object-proxy==1.3.1 | ||
MarkupSafe==1.0 | ||
mccabe==0.6.1 | ||
nbformat==4.4.0 | ||
numpy==1.15.1 | ||
pandas==0.23.4 | ||
parso==0.3.1 | ||
percy==2.0.0 | ||
pexpect==4.6.0 | ||
pickleshare==0.7.4 | ||
plotly==3.2.1 | ||
prompt-toolkit==1.0.15 | ||
ptyprocess==0.6.0 | ||
pycodestyle==2.3.1 | ||
pyflakes==1.6.0 | ||
Pygments==2.2.0 | ||
pylint==2.1.1 | ||
python-dateutil==2.7.3 | ||
pytz==2018.5 | ||
requests==2.19.1 | ||
retrying==1.3.3 | ||
selenium==3.14.0 | ||
simplegeneric==0.8.1 | ||
six==1.11.0 | ||
toml==0.9.6 | ||
traitlets==4.3.2 | ||
typed-ast==1.1.0 | ||
urllib3==1.23 | ||
wcwidth==0.1.7 | ||
Werkzeug==0.14.1 | ||
wrapt==1.10.11 | ||
-r requirements-base.txt | ||
-r requirements-v1.txt | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @alexcjohnson So interestingly Heroku does not seem super flexible about its setup procedure. The project has been tagged as Python and as far as I understand, that means it will look for setup.py, runtime.txt and requirements.txt -- so whatever weird multi version setup we have, we must play around that limitation. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Annoying, but nice solution! |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,8 @@ | |
ID_PREFIX = "app_dropdown" | ||
IDS = { | ||
"dropdown": ID_PREFIX, | ||
"dropdown-by-cell": '{}-row-by-cell'.format(ID_PREFIX) | ||
"dropdown-by-cell": '{}-row-by-cell'.format(ID_PREFIX), | ||
"dropdown-by-cell-deprecated": '{}-deprecated-row-by-cell'.format(ID_PREFIX) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not certain what happened but I think the recent change to renderer (keys/ids) is responsible for the regression -- both table NotifyObserver had the same key -- apparently causing the second one to disappear from the DOM entirely. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. release-v1 did not have this problem because the latest master changes haven't been merged in yet -- process yet to be put in place :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh interesting - that's probably going to bite us and our users a lot of places. Should we make it an exception on the Python side if you ever provide multiple components with matching id? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There is a duplicate ids check: plotly/dash#320 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
why wasn't that triggered here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Layout is dynamic, it doesn't work when that is the case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah got it, didn't notice that. More reason to make a dynamic test -> plotly/dash#475 (comment) |
||
} | ||
|
||
|
||
|
@@ -141,7 +142,7 @@ def layout(): | |
html.Div('This example uses a deprecated API, `dropdown_properties`.'), | ||
|
||
dash_table.DataTable( | ||
id=IDS['dropdown-by-cell'], | ||
id=IDS['dropdown-by-cell-deprecated'], | ||
data=df_per_row_dropdown.to_dict('rows'), | ||
columns=[ | ||
{'id': c, 'name': c} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test v0 stuff -- we only run server tests