From 7fd9af9c9c97e15654d8289da13f62be88497436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Wed, 19 Dec 2018 14:09:15 -0500 Subject: [PATCH 1/9] - v0 and v1 tests --- .circleci/config.yml | 101 ++++++++++++++++++++++++++++++----- dash_table/package-info.json | 6 ++- package.json | 6 ++- requirements-v0.txt | 4 ++ requirements-v1.txt | 4 ++ requirements.txt | 4 -- 6 files changed, 104 insertions(+), 21 deletions(-) create mode 100644 requirements-v0.txt create mode 100644 requirements-v1.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index 5eb7868ac..07bb1dacf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2 jobs: - "test": + "test-v0": docker: - image: circleci/python:3.6-node-browsers - image: cypress/base:10 @@ -34,11 +34,59 @@ jobs: command: | . venv/bin/activate pip install -r requirements.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.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 "visual-test": @@ -110,7 +158,7 @@ jobs: when: always - "python-3.6": + "python-3.6-v0": docker: - image: circleci/python:3.6-stretch-browsers @@ -126,9 +174,6 @@ jobs: command: | echo 'export PERCY_TOKEN="$PERCY_PYTHON_TOKEN"' >> $BASH_ENV - - restore_cache: - key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }} - - run: name: Create virtualenv command: | @@ -139,11 +184,7 @@ jobs: command: | . venv/bin/activate pip install -r requirements.txt --quiet - - - save_cache: - key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }} - paths: - - "venv" + pip install -r requirements-v0.txt --quiet - run: name: Run integration tests @@ -152,6 +193,40 @@ 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 + + steps: + - checkout + + - run: + name: Inject Percy Environment variables + command: | + echo 'export PERCY_TOKEN="$PERCY_PYTHON_TOKEN"' >> $BASH_ENV + + - run: + name: Create virtualenv + command: | + python3 -m venv venv + + - run: + name: Install requirements + command: | + . venv/bin/activate + pip install -r requirements.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 diff --git a/dash_table/package-info.json b/dash_table/package-info.json index 7efe1f26e..de919a0c2 100644 --- a/dash_table/package-info.json +++ b/dash_table/package-info.json @@ -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" diff --git a/package.json b/package.json index 7efe1f26e..de919a0c2 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/requirements-v0.txt b/requirements-v0.txt new file mode 100644 index 000000000..8a978093d --- /dev/null +++ b/requirements-v0.txt @@ -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 \ No newline at end of file diff --git a/requirements-v1.txt b/requirements-v1.txt new file mode 100644 index 000000000..5d3d4a3a7 --- /dev/null +++ b/requirements-v1.txt @@ -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 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index df0f21052..cba539c3f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,10 +8,6 @@ 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 From 0d0223fa676e312148b12cbf6ca9daf209e1cf3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Wed, 19 Dec 2018 14:11:25 -0500 Subject: [PATCH 2/9] update list of ci jobs --- .circleci/config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 07bb1dacf..b12d490f6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -232,7 +232,9 @@ workflows: version: 2 build: jobs: - - "python-3.6" + - "python-3.6-v0" + - "python-3.6-v1" - "node" - - "test" + - "test-v0" + - "test-v1" - "visual-test" From 548cb0f055908ac652814994c29633dde67ac6df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Wed, 19 Dec 2018 14:22:54 -0500 Subject: [PATCH 3/9] update percy output projects for python visual tests --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b12d490f6..bd8ff9af0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -164,7 +164,7 @@ jobs: environment: PERCY_ENABLED: True - PERCY_PROJECT: plotly/dash-table-python + PERCY_PROJECT: plotly/dash-table-python-v0 steps: - checkout @@ -199,7 +199,7 @@ jobs: environment: PERCY_ENABLED: True - PERCY_PROJECT: plotly/dash-table-python + PERCY_PROJECT: plotly/dash-table-python-v1 steps: - checkout From 92a608d5b0004a0b193b6f63217a9f00185ebfe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Wed, 19 Dec 2018 14:42:47 -0500 Subject: [PATCH 4/9] updated token source for python v0 and v1 --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bd8ff9af0..007044451 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -172,7 +172,7 @@ jobs: - run: name: Inject Percy Environment variables command: | - echo 'export PERCY_TOKEN="$PERCY_PYTHON_TOKEN"' >> $BASH_ENV + echo 'export PERCY_TOKEN="$PERCY_PYTHON_TOKEN_V0"' >> $BASH_ENV - run: name: Create virtualenv @@ -207,7 +207,7 @@ jobs: - run: name: Inject Percy Environment variables command: | - echo 'export PERCY_TOKEN="$PERCY_PYTHON_TOKEN"' >> $BASH_ENV + echo 'export PERCY_TOKEN="$PERCY_PYTHON_TOKEN_V1"' >> $BASH_ENV - run: name: Create virtualenv From 4622c9692d30a0ab4520bb75ee7226a419023aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Wed, 19 Dec 2018 15:14:25 -0500 Subject: [PATCH 5/9] update dropdown test -- possible side effect from renderer keys change --- tests/dash/app_dropdown.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/dash/app_dropdown.py b/tests/dash/app_dropdown.py index a735f0dc0..924873f0e 100644 --- a/tests/dash/app_dropdown.py +++ b/tests/dash/app_dropdown.py @@ -141,7 +141,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} From bbe770449319d10357bc2f5af1e1632e7652d602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Wed, 19 Dec 2018 15:19:23 -0500 Subject: [PATCH 6/9] ids --- tests/dash/app_dropdown.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/dash/app_dropdown.py b/tests/dash/app_dropdown.py index 924873f0e..22cc38c98 100644 --- a/tests/dash/app_dropdown.py +++ b/tests/dash/app_dropdown.py @@ -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": '{}-row-by-cell'.format(ID_PREFIX) } From 8e2e2d2559efef15c4068b9543aae6d62c992792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Wed, 19 Dec 2018 15:24:41 -0500 Subject: [PATCH 7/9] fixed the disappearing table --- tests/dash/app_dropdown.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/dash/app_dropdown.py b/tests/dash/app_dropdown.py index 22cc38c98..c047a1315 100644 --- a/tests/dash/app_dropdown.py +++ b/tests/dash/app_dropdown.py @@ -14,7 +14,7 @@ IDS = { "dropdown": ID_PREFIX, "dropdown-by-cell": '{}-row-by-cell'.format(ID_PREFIX), - "dropdown-by-cell-deprecated": '{}-row-by-cell'.format(ID_PREFIX) + "dropdown-by-cell-deprecated": '{}-deprecated-row-by-cell'.format(ID_PREFIX) } From 932d9a5d713768ad096505e7c35e4359d60b82a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Wed, 19 Dec 2018 15:45:34 -0500 Subject: [PATCH 8/9] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a3bed4d7..c27c827e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) From 6e5843c5e9a284041c284bf01aac3b7310adbc1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Wed, 19 Dec 2018 16:44:46 -0500 Subject: [PATCH 9/9] heroku - requirements need to contain everything from dash --- .circleci/config.yml | 8 +++--- requirements-base.txt | 56 +++++++++++++++++++++++++++++++++++++++++ requirements.txt | 58 ++----------------------------------------- 3 files changed, 62 insertions(+), 60 deletions(-) create mode 100644 requirements-base.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index 007044451..0a046a45b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,7 @@ 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: @@ -85,7 +85,7 @@ 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-v1.txt --quiet - run: @@ -183,7 +183,7 @@ 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: @@ -218,7 +218,7 @@ 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-v1.txt --quiet - run: diff --git a/requirements-base.txt b/requirements-base.txt new file mode 100644 index 000000000..cba539c3f --- /dev/null +++ b/requirements-base.txt @@ -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 diff --git a/requirements.txt b/requirements.txt index cba539c3f..690080fe8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,56 +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 -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 \ No newline at end of file