Skip to content

Commit

Permalink
Test Dash table against head of master and release-v1 (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc-Andre-Rivet committed Dec 19, 2018
1 parent 9fdb8cc commit c154b0e
Show file tree
Hide file tree
Showing 9 changed files with 177 additions and 85 deletions.
115 changes: 96 additions & 19 deletions packages/dash-table/.circleci/config.yml
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
Expand Down Expand Up @@ -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"
- 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
Expand All @@ -54,7 +102,7 @@ jobs:
name: Run tests
command: |
. venv/bin/activate
npm run test
npm run test-v1
"visual-test":
Expand Down Expand Up @@ -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
- run:
name: Create virtualenv
Expand All @@ -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
Expand All @@ -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"
4 changes: 4 additions & 0 deletions packages/dash-table/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Maintenance
- Test with head of both Dash v0.x and Dash v1.x [#20](https://github.com/plotly/dash-core/issues/20)

## [3.1.11] - 2018-12-10
### Fixed
- Selection, navigation, copy from readonly cell [#276](https://github.com/plotly/dash-table/issues/276)
Expand Down
6 changes: 4 additions & 2 deletions packages/dash-table/dash_table/package-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
"private::wait_dash8083": "wait-on http://localhost:8083",
"private::wait_js": "wait-on http://localhost:8080",
"private::opentests": "cypress open",
"private::runtests": "cypress run --browser chrome",
"private::runtests-v0": "cypress run --browser chrome --spec 'tests/cypress/tests/server/**/*'",
"private::runtests-v1": "cypress run --browser chrome",
"build.watch": "webpack-dev-server --content-base dash_table --mode development",
"build": "run-s private::build:js private::build:py",
"lint": "tslint '{src,demo,tests}/**/*.{js,ts,tsx}' --exclude '**/@Types/*.*'",
"test": "run-p --race private::host* private::runtests",
"test-v0": "run-p --race private::host* private::runtests-v0",
"test-v1": "run-p --race private::host* private::runtests-v1",
"test.visual": "build-storybook && percy-storybook",
"test.visual-local": "build-storybook",
"test.watch": "run-p --race \"private::build:js-test-watch\" --race private::host* private::opentests"
Expand Down
6 changes: 4 additions & 2 deletions packages/dash-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
"private::wait_dash8083": "wait-on http://localhost:8083",
"private::wait_js": "wait-on http://localhost:8080",
"private::opentests": "cypress open",
"private::runtests": "cypress run --browser chrome",
"private::runtests-v0": "cypress run --browser chrome --spec 'tests/cypress/tests/server/**/*'",
"private::runtests-v1": "cypress run --browser chrome",
"build.watch": "webpack-dev-server --content-base dash_table --mode development",
"build": "run-s private::build:js private::build:py",
"lint": "tslint '{src,demo,tests}/**/*.{js,ts,tsx}' --exclude '**/@Types/*.*'",
"test": "run-p --race private::host* private::runtests",
"test-v0": "run-p --race private::host* private::runtests-v0",
"test-v1": "run-p --race private::host* private::runtests-v1",
"test.visual": "build-storybook && percy-storybook",
"test.visual-local": "build-storybook",
"test.watch": "run-p --race \"private::build:js-test-watch\" --race private::host* private::opentests"
Expand Down
56 changes: 56 additions & 0 deletions packages/dash-table/requirements-base.txt
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
4 changes: 4 additions & 0 deletions packages/dash-table/requirements-v0.txt
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
4 changes: 4 additions & 0 deletions packages/dash-table/requirements-v1.txt
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
62 changes: 2 additions & 60 deletions packages/dash-table/requirements.txt
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
5 changes: 3 additions & 2 deletions packages/dash-table/tests/dash/app_dropdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}


Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit c154b0e

Please sign in to comment.