Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Update toolchain #939

Merged
merged 65 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
727a2ab
update toolchain + delete jest tests
Marc-Andre-Rivet Mar 22, 2021
f9473df
remove unit tests from CI
Marc-Andre-Rivet Mar 22, 2021
0a996ef
remove `.min`
Marc-Andre-Rivet Mar 22, 2021
e8d45f1
no cache
Marc-Andre-Rivet Mar 22, 2021
05c5531
add back cache / change name
Marc-Andre-Rivet Mar 22, 2021
2f8253e
simplify manifest
Marc-Andre-Rivet Mar 22, 2021
b9e1e5b
bust cache again
Marc-Andre-Rivet Mar 22, 2021
39b1021
undo filename
Marc-Andre-Rivet Mar 23, 2021
1a7f98a
node polyfills
Marc-Andre-Rivet Mar 23, 2021
ca2388b
update loaders / `insertAt` equivalent logic
Marc-Andre-Rivet Mar 23, 2021
670c60a
update react-resize-detector
Marc-Andre-Rivet Mar 23, 2021
fd06f77
eslint re-upgrade
Marc-Andre-Rivet Mar 23, 2021
5526971
update ci images + py39
Marc-Andre-Rivet Mar 23, 2021
6c37bef
remove `.min.` from the pacakge's main entrypoint
Marc-Andre-Rivet Mar 23, 2021
8b96292
rewrite `test_integration_1` tests with fixture
Marc-Andre-Rivet Mar 23, 2021
aa99547
lint
Marc-Andre-Rivet Mar 23, 2021
8a8a946
rewrite legacy tests with dash_dcc // gut out additional jest testing…
Marc-Andre-Rivet Mar 23, 2021
86c5a05
fix linting
Marc-Andre-Rivet Mar 23, 2021
e9c5016
fix new tests
Marc-Andre-Rivet Mar 23, 2021
7e52059
black
Marc-Andre-Rivet Mar 23, 2021
6609e7c
Add back test_dash_import
Marc-Andre-Rivet Mar 24, 2021
3442c2e
clean up cache busting
Marc-Andre-Rivet Mar 24, 2021
94ada70
remove debugging / no minification
Marc-Andre-Rivet Mar 24, 2021
cc49e55
robustify ldcp006
Marc-Andre-Rivet Mar 24, 2021
0da9efa
lint
Marc-Andre-Rivet Mar 24, 2021
119928e
temporarily add back py37 for snapshots validation
Marc-Andre-Rivet Mar 25, 2021
a808884
CI config tweak
Marc-Andre-Rivet Mar 25, 2021
e1d6d66
add logs asserts to all tests
Marc-Andre-Rivet Mar 25, 2021
17cbc6d
lint
Marc-Andre-Rivet Mar 25, 2021
964da77
fix broken test `test_dddo001_dynamic_options`
Marc-Andre-Rivet Mar 25, 2021
68fecef
lint
Marc-Andre-Rivet Mar 25, 2021
ade97e2
only snapshot py37
Marc-Andre-Rivet Mar 25, 2021
904acca
finalize
Marc-Andre-Rivet Mar 25, 2021
40b33ec
- fix `test_rdpr001_persisted_dps`, `test_rdpr002_persisted_dpr`, `te…
Marc-Andre-Rivet Mar 25, 2021
1d72c02
undo react-markdown version update
Marc-Andre-Rivet Mar 26, 2021
69a5431
Merge branch 'dev' into update-toolchain-20210322
alexcjohnson Jul 1, 2021
db37726
remove demo server
alexcjohnson Jul 1, 2021
75fb218
upgrade some relatively safe deps
alexcjohnson Jul 1, 2021
55a486c
new black from dash
alexcjohnson Jul 1, 2021
420e08c
downgrade to react 16
alexcjohnson Jul 1, 2021
fbcae14
prettier updates
alexcjohnson Jul 1, 2021
ad29d46
husky to v7
alexcjohnson Jul 1, 2021
377d3a1
eslint updates
alexcjohnson Jul 1, 2021
5794688
R/Julia build updates
alexcjohnson Jul 1, 2021
1babbce
update highlight.js
alexcjohnson Jul 1, 2021
14a0e1e
plotly.js v2.2.0
alexcjohnson Jul 2, 2021
8469d13
black scope fix
alexcjohnson Jul 2, 2021
1ea6e86
hack for styled-jsx@3.4 with babel
alexcjohnson Jul 2, 2021
d69b3ca
webpack minor
alexcjohnson Jul 2, 2021
0a5f054
plotly.js 2.2 changelog
alexcjohnson Jul 2, 2021
a1dbbe4
use dash deps update branch on CI
alexcjohnson Jul 2, 2021
9a84e8f
black opt-in instead of opt-out
alexcjohnson Jul 2, 2021
f15988d
install webpack update
alexcjohnson Jul 2, 2021
f4c77e0
update highlight override test
alexcjohnson Jul 2, 2021
44aac1e
drop py37 tests
alexcjohnson Jul 2, 2021
59f56c5
plotly.js 2.2.1 and update package-lock to npm 7
alexcjohnson Jul 6, 2021
5178392
fix tests with assets
alexcjohnson Jul 7, 2021
609024e
changelog for plotly.js 2.2.1
alexcjohnson Jul 7, 2021
5502176
roll back react-jsx-parser to a known good version
alexcjohnson Jul 7, 2021
3a535bd
gitignore julia entry point
alexcjohnson Jul 7, 2021
eb7d677
renumber slider tests to be unique
alexcjohnson Jul 7, 2021
df5ac65
a few more minor dep updates
alexcjohnson Jul 7, 2021
7a519bf
fixed width for slider tooltip percy tests
alexcjohnson Jul 8, 2021
3af946f
fixup plotlyjs 2.2.1 changelog
alexcjohnson Jul 8, 2021
98d617e
centralize test assets for percy
alexcjohnson Jul 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ lib/
.prettierrc
.circleci
.github
.build_cache

# demo folder has special meaning in R
# this should hopefully make it still
Expand Down
3 changes: 0 additions & 3 deletions .builderrc

This file was deleted.

113 changes: 21 additions & 92 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:
steps:
- run: percy finalize --all

lint-unit-37: &lint-unit
lint-unit-39: &lint-unit
working_directory: ~/project
docker:
- image: circleci/python:3.7.9-stretch-node-browsers
- image: circleci/python:3.9.2-buster-node-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PYTHON_VERSION: py37
PYTHON_VERSION: py39
steps:
- checkout
- run: echo $PYTHON_VERSION > ver.txt
Expand All @@ -28,7 +28,7 @@ jobs:
command: |
sudo pip install virtualenv --upgrade
python -m venv venv || virtualenv venv && . venv/bin/activate
pip install --progress-bar off -e git+https://github.com/plotly/dash.git@dev#egg=dash[dev,testing]
pip install --progress-bar off -e git+https://github.com/plotly/dash.git@deps-update-20210628#egg=dash[dev,testing]
pip install --progress-bar off --no-cache-dir -r dev-requirements.txt
- save_cache:
key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "dev-requirements.txt" }}
Expand All @@ -41,16 +41,11 @@ jobs:
set -eo pipefail
npm ci
npm run lint
- run:
name: 🔎 Unit Tests
command: |
set -eo pipefail
npm run test-unit

lint-unit-36:
<<: *lint-unit
docker:
- image: circleci/python:3.6.12-stretch-node-browsers
- image: circleci/python:3.6.13-stretch-node-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
Expand All @@ -67,15 +62,15 @@ jobs:
environment:
PYTHON_VERSION: py27

build-dash-37: &build-dash
build-dash-39: &build-dash
working_directory: ~/project
alexcjohnson marked this conversation as resolved.
Show resolved Hide resolved
docker:
- image: circleci/python:3.7.9-stretch-node-browsers
- image: circleci/python:3.9.2-buster-node-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PYTHON_VERSION: py37
PYTHON_VERSION: py39
steps:
- checkout
- run: echo $PYTHON_VERSION > ver.txt
Expand Down Expand Up @@ -115,7 +110,7 @@ jobs:
build-dash-36:
<<: *build-dash
docker:
- image: circleci/python:3.6.12-stretch-node-browsers
- image: circleci/python:3.6.13-stretch-node-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
Expand All @@ -132,16 +127,17 @@ jobs:
environment:
PYTHON_VERSION: py27

test-37: &test
test-39: &test
working_directory: ~/project
docker:
- image: circleci/python:3.7.9-stretch-node-browsers
- image: circleci/python:3.9.2-buster-node-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PYTHON_VERSION: py37
PYTHON_VERSION: py39
PERCY_PARALLEL_TOTAL: -1
PERCY_ENABLE: 1
parallelism: 3
steps:
- checkout
Expand All @@ -159,6 +155,7 @@ jobs:
find . -name "dash_*.gz" | xargs pip install -I --progress-bar off --no-cache-dir
pip install --no-cache-dir --progress-bar off main.tar.gz[dev,testing]
pip list | grep dash | xargs pip show && cd ..
echo $(python -V 2>&1) | grep 3. && python -m unittest tests/test_dash_import.py
TESTFILES=$(circleci tests glob "tests/integration/**/test_*.py" | circleci tests split --split-by=timings)
pytest --headless --nopercyfinalize --junitxml=test-reports/junit_intg.xml ${TESTFILES}
- store_artifacts:
Expand All @@ -171,7 +168,7 @@ jobs:
test-36:
<<: *test
docker:
- image: circleci/python:3.6.12-stretch-node-browsers
- image: circleci/python:3.6.13-stretch-node-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
Expand All @@ -190,80 +187,18 @@ jobs:
PYTHON_VERSION: py27
PERCY_ENABLE: 0

test-legacy-37: &test-legacy
working_directory: ~/project
docker:
- image: circleci/python:3.7.9-stretch-node-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PYTHON_VERSION: py37
PERCY_PARALLEL_TOTAL: -1
parallelism: 2
steps:
- checkout
- run: echo $PYTHON_VERSION > ver.txt
- restore_cache:
key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "dev-requirements.txt" }}
- attach_workspace:
at: ~/project
- run:
name: 🧪 Run Legacy Integration Tests
command: |
. venv/bin/activate && rm -rf dash_core_components && ls -la
set -eo pipefail
cd packages && mv dash-*.tar.gz main.tar.gz && ls -la
find . -name "dash_*.gz" | xargs pip install -I --progress-bar off --no-cache-dir
pip install --no-cache-dir --progress-bar off main.tar.gz[dev,testing]
pip list | grep dash | xargs pip show && cd ..
echo $(python -V 2>&1) | grep 3. && python -m unittest tests/test_dash_import.py
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TESTFILES=$(circleci tests glob "tests/test_integration_*.py" | circleci tests split --split-by=timings)
pytest --durations=10 --junitxml=test-reports/junit_legacy.xml ${TESTFILES}
- store_artifacts:
path: test-reports
- store_test_results:
path: test-reports
- store_artifacts:
path: /tmp/dash_artifacts

test-legacy-36:
<<: *test-legacy
docker:
- image: circleci/python:3.6.12-stretch-node-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PYTHON_VERSION: py36
PERCY_ENABLE: 0
test-legacy-27:
<<: *test-legacy
docker:
- image: circleci/python:2.7.18-stretch-node-browsers
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PYTHON_VERSION: py27
PERCY_ENABLE: 0

workflows:
version: 2
python3.7:
python3.9:
jobs:
- lint-unit-37
- build-dash-37
- test-37:
requires:
- build-dash-37
- test-legacy-37:
- lint-unit-39
- build-dash-39
- test-39:
requires:
- build-dash-37
- build-dash-39
- percy-finalize:
requires:
- test-37
- test-legacy-37
- test-39

python3.6:
jobs:
Expand All @@ -272,9 +207,6 @@ workflows:
- test-36:
requires:
- build-dash-36
- test-legacy-36:
requires:
- build-dash-36

python2.7:
jobs:
Expand All @@ -283,6 +215,3 @@ workflows:
- test-27:
requires:
- build-dash-27
- test-legacy-27:
requires:
- build-dash-27
5 changes: 1 addition & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@
"browser": true,
"es6": true,
"jasmine": true,
"jest": true,
"node": true
},
"globals": {
"jest": true
},
"plugins": [
"react",
"import"
Expand Down Expand Up @@ -80,6 +76,7 @@
"no-param-reassign": ["off"],
"no-process-env": ["warn"],
"no-proto": ["error"],
"no-prototype-builtins": ["off"],
"no-redeclare": ["error"],
"no-return-assign": ["error"],
"no-script-url": ["error"],
Expand Down
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
ignore = C901, E203, E266, E501, E731, W503
ignore = C901, E203, E231, E266, E501, E731, W503
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Black/flake8 disagreement about spaces after trailing comma. Black wins over Flake8, same as in the dash-table.

select = B,C,E,F,W,T4
per-file-ignores =
tests/*: E722, F811
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ dash_core_components_base/plotly.min.js
/man
/R
/src/*.jl
/src/jl/
DESCRIPTION
NAMESPACE
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run lint
5 changes: 0 additions & 5 deletions .huskyrc

This file was deleted.

1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"arrowParens": "avoid",
"tabWidth": 4,
"singleQuote": true,
"bracketSpacing": false,
Expand Down
23 changes: 22 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,29 @@ This project adheres to [Semantic Versioning](http://semver.org/).
It not only fixes the bug where the tooltips were visible when slider was not, but it also reduces the lag in the
tooltip when the slider handles are moved.

### Updated
- [#939](https://github.com/plotly/dash-core-components/pull/939) Upgrade Plotly.js to v2.2.1. Note that this is a major version upgrade to Plotly.js, however we are not treating this as a breaking change for DCC as the majority of breaking changes in Plotly.js do not affect the Dash API. The one exception is that several trace types that have long been deprecated are removed entirely.
- [Major release 2.0.0](https://github.com/plotly/plotly.js/releases/tag/v2.0.0):
- Stop exporting d3 as `Plotly.d3`, and remove many other deep pieces of the public API. This does not affect the `dcc.Graph` component, but if you make use of `Plotly` from the global scope in some other way you may be affected.
- Drop the deprecated trace types `contourgl` and `area`, as well as legacy pre-`scatterpolar` polar attributes `bar.r`, `bar.t`, `scatter.r`, `scatter.t`, `layout.radialaxis`, `layout.angularaxis`. Use `scatterpolar`, `barpolar`, and `polar` subplots instead.
- `heatmapgl` and `pointcloud` trace types, and the `transform` attribute are deprecated, and will be removed in a future release.
- Increase CSP safety by removing function constructors. 3D plots still use function constructors, but if you place one of the non-3D bundles (including the new `strict` bundle) in your `assets` folder you will have no function constructors.
- Remove "Aa" text in legends.
- Default `hovermode` to "closest".
- Default `textposition` to "auto" in `bar` traces. If you previously used the `bar.text` attribute for hover only, you will need to explicitly set `textposition="none"`.
- Add `bar.marker.pattern`, `image.zsmooth`, and various other features and bugfixes.
- [Feature release 2.1.0](https://github.com/plotly/plotly.js/releases/tag/v2.1.0):
- New `icicle` trace type.
- New `legendrank` trace attribute.
- Several other additions and bug fixes.
- [Feature release 2.2.0](https://github.com/plotly/plotly.js/releases/tag/v2.2.0):
- Legend group titles
- Half-year directive (`%h`) for date formatting
- Several other bug fixes and performance improvements
- [Patch release 2.2.1](https://github.com/plotly/plotly.js/releases/tag/v2.2.1) containing a security fix.

### Added
- [#932](https://github.com/plotly/dash-core-components/pull/932). Adds a new copy to clipboard component.
- [#932](https://github.com/plotly/dash-core-components/pull/932) Adds a new copy to clipboard component.
- [#948](https://github.com/plotly/dash-core-components/pull/948)] Adds `disabled_days` prop to `DatePickerRange` and `DatePickerSingle` components. With this prop you can specify days that should be made unselectable in the date picker, in addition to those that fall outside of the range specified by `min_date_allowed` and `max_date_allowed`.

### Changed
Expand Down
9 changes: 2 additions & 7 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
include dash_core_components/dash_core_components.min.js
include dash_core_components/dash_core_components.min.js.map
include dash_core_components/dash_core_components-shared.js
include dash_core_components/dash_core_components-shared.js.map
include dash_core_components/async-*.js
include dash_core_components/async-*.js.map
include dash_core_components/*.js
include dash_core_components/*.js.map
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is consistent with what is being done in other repos and how these deps are published in the npm package.

include dash_core_components/metadata.json
include dash_core_components/package-info.json
include dash_core_components/plotly.min.js
include README.md
include LICENSE.txt
include package.json
17 changes: 1 addition & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,13 @@ $ npm i --ignore-scripts && npm run build
$ pip install -e .
```

### Demo server

You can start up a demo development server to see a demo of the rendered
components:

```sh
$ npm start
```

You have to maintain the list of components in `demo/Demo.react.js`.

### Code quality and tests

### To run integration tests (test_integration.py)
You can run the Selenium integration tests with the
```sh
npm test
```
command, and the Jest unit tests with the
```sh
npm run test-unit
```

### Testing your components in Dash
1. Run the build watcher by running
Expand Down Expand Up @@ -88,4 +73,4 @@ See the [dash-component-boilerplate](https://github.com/plotly/dash-component-bo


## Big Thanks
Cross-browser Testing Powered by [![image](https://user-images.githubusercontent.com/1394467/64290307-e4c66600-cf33-11e9-85a1-12c82230a597.png)](https://saucelabs.com)
Cross-browser Testing Powered by [![image](https://user-images.githubusercontent.com/1394467/64290307-e4c66600-cf33-11e9-85a1-12c82230a597.png)](https://saucelabs.com)
2 changes: 0 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ const presets = [
];

const plugins = [
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-syntax-dynamic-import'
];

Expand Down
Loading