Skip to content

Commit e78f440

Browse files
authored
Merge branch 'dev' into patch-1
2 parents 21dd148 + 9ea1710 commit e78f440

30 files changed

+588
-165
lines changed

.circleci/config.yml

+75-33
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@ jobs:
55
percy-finalize:
66
docker:
77
- image: percyio/agent
8+
auth:
9+
username: dashautomation
10+
password: $DASH_PAT_DOCKERHUB
811
steps:
912
- run: percy finalize --all
1013

1114
artifacts:
1215
docker:
1316
- image: circleci/python:3.7.6-stretch-node-browsers
17+
auth:
18+
username: dashautomation
19+
password: $DASH_PAT_DOCKERHUB
1420
environment:
1521
PYVERSION: python37
1622
steps:
@@ -28,6 +34,9 @@ jobs:
2834
working_directory: ~/dash
2935
docker:
3036
- image: circleci/python:3.7.6-stretch-node-browsers
37+
auth:
38+
username: dashautomation
39+
password: $DASH_PAT_DOCKERHUB
3140
environment:
3241
PYLINTRC: .pylintrc37
3342
PYVERSION: python37
@@ -65,6 +74,9 @@ jobs:
6574
<<: *lint-unit
6675
docker:
6776
- image: circleci/python:3.6.9-stretch-node-browsers
77+
auth:
78+
username: dashautomation
79+
password: $DASH_PAT_DOCKERHUB
6880
environment:
6981
PYLINTRC: .pylintrc
7082
PYVERSION: python36
@@ -73,6 +85,9 @@ jobs:
7385
<<: *lint-unit
7486
docker:
7587
- image: circleci/python:2.7.18-stretch-node-browsers
88+
auth:
89+
username: dashautomation
90+
password: $DASH_PAT_DOCKERHUB
7691
environment:
7792
PYLINTRC: .pylintrc
7893
PYVERSION: python27
@@ -81,6 +96,9 @@ jobs:
8196
working_directory: ~/dash
8297
docker:
8398
- image: circleci/python:3.7.6-stretch-node-browsers
99+
auth:
100+
username: dashautomation
101+
password: $DASH_PAT_DOCKERHUB
84102
environment:
85103
PYVERSION: python37
86104
steps:
@@ -116,20 +134,29 @@ jobs:
116134
<<: *build-core
117135
docker:
118136
- image: circleci/python:3.6.9-stretch-node-browsers
137+
auth:
138+
username: dashautomation
139+
password: $DASH_PAT_DOCKERHUB
119140
environment:
120141
PYVERSION: python36
121142

122143
build-core-27:
123144
<<: *build-core
124145
docker:
125146
- image: circleci/python:2.7.18-stretch-node-browsers
147+
auth:
148+
username: dashautomation
149+
password: $DASH_PAT_DOCKERHUB
126150
environment:
127151
PYVERSION: python27
128152

129153
build-misc-37: &build-misc
130154
working_directory: ~/dash
131155
docker:
132156
- image: circleci/python:3.7.6-stretch-node-browsers
157+
auth:
158+
username: dashautomation
159+
password: $DASH_PAT_DOCKERHUB
133160
environment:
134161
PYVERSION: python37
135162

@@ -166,17 +193,23 @@ jobs:
166193
<<: *build-misc
167194
docker:
168195
- image: circleci/python:3.6.9-stretch-node-browsers
196+
auth:
197+
username: dashautomation
198+
password: $DASH_PAT_DOCKERHUB
169199
environment:
170200
PYVERSION: python36
171201

172202
build-misc-27:
173203
<<: *build-misc
174204
docker:
175205
- image: circleci/python:2.7.18-stretch-node-browsers
206+
auth:
207+
username: dashautomation
208+
password: $DASH_PAT_DOCKERHUB
176209
environment:
177210
PYVERSION: python27
178211

179-
build-windows-37: &build-windows
212+
build-windows-37:
180213
working_directory: ~/dash
181214
executor:
182215
name: win/default
@@ -186,37 +219,21 @@ jobs:
186219
steps:
187220
- checkout
188221
- run: echo $PYVERSION > ver.txt
189-
- restore_cache:
190-
key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-dev.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }}
191-
- run:
192-
name: ️️🏗️ pip dev requirements
193-
command: |
194-
pip install --upgrade virtualenv
195-
virtualenv venv
196-
source venv/Scripts/activate
197-
sed -i '/dash-/d' requires-install.txt
198-
pip install -e . --no-cache-dir -r requires-install.txt -r requires-dev.txt -r requires-testing.txt --progress-bar off
199-
- save_cache:
200-
key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-dev.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }}
201-
paths:
202-
- venv
203222
- run:
204223
name: ️️🏗️ build core
205224
command: |
206-
source venv/Scripts/activate && pip install --no-cache-dir --upgrade -e . --progress-bar off && mkdir packages
225+
pip install --no-cache-dir --upgrade -e .[dev,testing] --progress-bar off
207226
cd dash-renderer && renderer build && python setup.py sdist && mv dist/* ../packages/ && cd ..
208227
git clone --depth 1 https://github.com/plotly/dash-core-components.git
209-
cd dash-core-components && npm ci && npm run build && python setup.py sdist && mv dist/* ../packages/ && cd ..
210-
ls -la packages
211-
- persist_to_workspace:
212-
root: ~/dash
213-
paths:
214-
- packages/*.tar.gz
228+
cd dash-core-components && npm ci && npm run build && python setup.py sdist && cd ..
215229
216230
build-dashr:
217231
working_directory: ~/dashr
218232
docker:
219233
- image: plotly/dashr:ci
234+
auth:
235+
username: dashautomation
236+
password: $DASH_PAT_DOCKERHUB
220237
environment:
221238
PERCY_PARALLEL_TOTAL: -1
222239
PYVERSION: python37
@@ -325,6 +342,9 @@ jobs:
325342
working_directory: ~/dash
326343
docker:
327344
- image: circleci/python:3.7.6-stretch-node-browsers
345+
auth:
346+
username: dashautomation
347+
password: $DASH_PAT_DOCKERHUB
328348
environment:
329349
PERCY_PARALLEL_TOTAL: -1
330350
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: True
@@ -367,6 +387,9 @@ jobs:
367387
<<: *test
368388
docker:
369389
- image: circleci/python:3.6.9-stretch-node-browsers
390+
auth:
391+
username: dashautomation
392+
password: $DASH_PAT_DOCKERHUB
370393
environment:
371394
PERCY_ENABLE: 0
372395
PYVERSION: python36
@@ -375,6 +398,9 @@ jobs:
375398
<<: *test
376399
docker:
377400
- image: circleci/python:2.7.18-stretch-node-browsers
401+
auth:
402+
username: dashautomation
403+
password: $DASH_PAT_DOCKERHUB
378404
environment:
379405
PERCY_ENABLE: 0
380406
PYVERSION: python27
@@ -383,20 +409,28 @@ workflows:
383409
version: 2
384410
python3.7:
385411
jobs:
386-
- lint-unit-37
387-
- build-core-37
388-
- build-windows-37
389-
- build-misc-37
390-
- build-dashr
412+
- lint-unit-37:
413+
context: dash-docker-hub
414+
- build-core-37:
415+
context: dash-docker-hub
416+
- build-windows-37:
417+
context: dash-docker-hub
418+
- build-misc-37:
419+
context: dash-docker-hub
420+
- build-dashr:
421+
context: dash-docker-hub
391422
- test-37:
423+
context: dash-docker-hub
392424
requires:
393425
- build-core-37
394426
- build-misc-37
395427
- percy-finalize:
428+
context: dash-docker-hub
396429
requires:
397430
- build-dashr
398431
- test-37
399432
- artifacts:
433+
context: dash-docker-hub
400434
requires:
401435
- percy-finalize
402436
filters:
@@ -409,19 +443,27 @@ workflows:
409443

410444
python3.6:
411445
jobs:
412-
- lint-unit-36
413-
- build-core-36
414-
- build-misc-36
446+
- lint-unit-36:
447+
context: dash-docker-hub
448+
- build-core-36:
449+
context: dash-docker-hub
450+
- build-misc-36:
451+
context: dash-docker-hub
415452
- test-36:
453+
context: dash-docker-hub
416454
requires:
417455
- build-core-36
418456
- build-misc-36
419457
python2.7:
420458
jobs:
421-
- lint-unit-27
422-
- build-core-27
423-
- build-misc-27
459+
- lint-unit-27:
460+
context: dash-docker-hub
461+
- build-core-27:
462+
context: dash-docker-hub
463+
- build-misc-27:
464+
context: dash-docker-hub
424465
- test-27:
466+
context: dash-docker-hub
425467
requires:
426468
- build-core-27
427469
- build-misc-27

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
github: plotly
12
custom: https://plotly.com/products/consulting-and-oem/

@plotly/dash-test-components/babel.config.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@ const presets = [
33
'@babel/preset-react'
44
];
55

6-
module.exports = { presets };
6+
const plugins = [
7+
'@babel/plugin-syntax-dynamic-import'
8+
];
9+
10+
module.exports = { presets, plugins };

@plotly/dash-test-components/package-lock.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

@plotly/dash-test-components/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@
2222
"devDependencies": {
2323
"@babel/cli": "^7.4.0",
2424
"@babel/core": "^7.4.0",
25+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
2526
"@babel/preset-env": "^7.4.1",
2627
"@babel/preset-react": "^7.0.0",
28+
"@plotly/dash-component-plugins": "^1.2.0",
29+
"@plotly/webpack-dash-dynamic-import": "^1.1.5",
2730
"babel-loader": "^8.0.5",
2831
"npm-run-all": "^4.1.5",
2932
"react": "16.13.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import PropTypes from 'prop-types';
2+
import React, { Suspense } from 'react';
3+
import { asyncDecorator } from '@plotly/dash-component-plugins';
4+
import asyncComponentLoader from './../fragments/AsyncComponentLoader';
5+
6+
const AsyncComponent = props => (<Suspense fallback={null}>
7+
<RealAsyncComponent {...props} />
8+
</Suspense>);
9+
10+
const RealAsyncComponent = asyncDecorator(AsyncComponent, asyncComponentLoader);
11+
12+
AsyncComponent.propTypes = {
13+
id: PropTypes.string,
14+
value: PropTypes.string
15+
};
16+
17+
AsyncComponent.defaultProps = {};
18+
19+
export default AsyncComponent;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import PropTypes from 'prop-types';
2+
import React, { Fragment } from 'react';
3+
4+
const CollapseComponent = props => (<Fragment>
5+
{display ? props.children : null}
6+
</Fragment>);
7+
8+
CollapseComponent.propTypes = {
9+
children: PropTypes.node,
10+
display: PropTypes.bool,
11+
id: PropTypes.string
12+
};
13+
14+
CollapseComponent.defaultProps = {
15+
display: false
16+
};
17+
18+
export default CollapseComponent;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import PropTypes from 'prop-types';
2+
import React from 'react';
3+
4+
const DelayedEventComponent = ({ id, n_clicks, setProps }) => (<button
5+
id={id}
6+
onClick={() => setTimeout(() => setProps({ n_clicks: n_clicks + 1 }), 20)}
7+
/>);
8+
9+
DelayedEventComponent.propTypes = {
10+
id: PropTypes.string,
11+
n_clicks: PropTypes.number
12+
};
13+
14+
DelayedEventComponent.defaultProps = {
15+
n_clicks: 0
16+
};
17+
18+
export default DelayedEventComponent;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import PropTypes from 'prop-types';
2+
import React, { Fragment } from 'react';
3+
4+
const FragmentComponent = props => (<Fragment>
5+
{props.children}
6+
</Fragment>);
7+
8+
FragmentComponent.propTypes = {
9+
children: PropTypes.node,
10+
id: PropTypes.string
11+
};
12+
13+
FragmentComponent.defaultProps = {};
14+
15+
export default FragmentComponent;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import PropTypes from 'prop-types';
2+
import React, { Fragment } from 'react';
3+
4+
const WidthComponent = props => (<Fragment>
5+
{props.width}
6+
</Fragment>);
7+
8+
WidthComponent.propTypes = {
9+
id: PropTypes.string,
10+
width: PropTypes.number
11+
};
12+
13+
WidthComponent.defaultProps = {
14+
width: 0
15+
};
16+
17+
export default WidthComponent;

0 commit comments

Comments
 (0)