Skip to content

Commit 1aea686

Browse files
committed
Merge remote-tracking branch 'remote/dev' into support-async-callbacks
# Conflicts: # .circleci/config.yml # dash/_callback.py # dash/background_callback/managers/celery_manager.py # dash/dash.py
2 parents 5b201a1 + c3bbbe3 commit 1aea686

File tree

240 files changed

+10927
-10082
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+10927
-10082
lines changed

.circleci/config.yml

Lines changed: 36 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2.1
33
orbs:
44
win: circleci/[email protected]
55
percy: percy/[email protected]
6-
browser-tools: circleci/browser-tools@1.4.8
6+
browser-tools: circleci/browser-tools@1.5.1
77

88

99
jobs:
@@ -99,7 +99,11 @@ jobs:
9999

100100
steps:
101101
- checkout
102-
- run: sudo apt-get update
102+
- run:
103+
name: Add chrome keys & update.
104+
command: |
105+
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
106+
sudo apt-get update
103107
- run: echo $PYVERSION > ver.txt
104108
- run: cat requirements/*.txt > requirements-all.txt
105109
- restore_cache:
@@ -189,7 +193,11 @@ jobs:
189193
steps:
190194
- checkout:
191195
path: ~/dash
192-
- run: sudo apt-get update
196+
- run:
197+
name: Add chrome keys & update.
198+
command: |
199+
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
200+
sudo apt-get update
193201
- run: echo $PYVERSION > ver.txt
194202
- run: cat requirements/*.txt > requirements-all.txt
195203
- restore_cache:
@@ -270,24 +278,6 @@ jobs:
270278
- store_artifacts:
271279
path: /tmp/dash_artifacts
272280

273-
test-312-react-18:
274-
<<: *test
275-
docker:
276-
- image: cimg/python:3.12.1-browsers
277-
auth:
278-
username: dashautomation
279-
password: $DASH_PAT_DOCKERHUB
280-
environment:
281-
PERCY_ENABLE: 0
282-
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: True
283-
PYVERSION: python312
284-
REDIS_URL: redis://localhost:6379
285-
REACT_VERSION: "18.2.0"
286-
- image: cimg/redis:6.2.6
287-
auth:
288-
username: dashautomation
289-
password: $DASH_PAT_DOCKERHUB
290-
291281
test-38:
292282
<<: *test
293283
docker:
@@ -357,7 +347,11 @@ jobs:
357347
steps:
358348
- checkout:
359349
path: ~/dash
360-
- run: sudo apt-get update
350+
- run:
351+
name: Add chrome keys & update.
352+
command: |
353+
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
354+
sudo apt-get update
361355
- run: echo $PYVERSION > ver.txt
362356
- run: cat requirements/*.txt > requirements-all.txt
363357
- restore_cache:
@@ -388,18 +382,6 @@ jobs:
388382
- store_artifacts:
389383
path: /tmp/dash_artifacts
390384

391-
dcc-312-react-18:
392-
<<: *dcc-test
393-
docker:
394-
- image: cimg/python:3.12.1-browsers
395-
auth:
396-
username: dashautomation
397-
password: $DASH_PAT_DOCKERHUB
398-
environment:
399-
PYVERSION: python312
400-
PERCY_ENABLE: 0
401-
REACT_VERSION: "18.2.0"
402-
403385
dcc-38:
404386
<<: *dcc-test
405387
docker:
@@ -426,7 +408,11 @@ jobs:
426408
steps:
427409
- checkout:
428410
path: ~/dash
429-
- run: sudo apt-get update
411+
- run:
412+
name: Add chrome keys & update.
413+
command: |
414+
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
415+
sudo apt-get update
430416
- run: echo $PYVERSION > ver.txt
431417
- run: cat requirements/*.txt > requirements-all.txt
432418
- restore_cache:
@@ -465,18 +451,6 @@ jobs:
465451
- store_artifacts:
466452
path: /tmp/dash_artifacts
467453

468-
html-312-react-18:
469-
<<: *html-test
470-
docker:
471-
- image: cimg/python:3.12.1-browsers
472-
auth:
473-
username: dashautomation
474-
password: $DASH_PAT_DOCKERHUB
475-
environment:
476-
PYVERSION: python312
477-
PERCY_ENABLE: 0
478-
REACT_VERSION: "18.2.0"
479-
480454
html-38:
481455
<<: *html-test
482456
docker:
@@ -502,7 +476,11 @@ jobs:
502476
steps:
503477
- checkout:
504478
path: ~/dash
505-
- run: sudo apt-get update
479+
- run:
480+
name: Add chrome keys & update.
481+
command: |
482+
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
483+
sudo apt-get update
506484
- run: echo $PYVERSION > ver.txt
507485
- run: cat requirements/*.txt > requirements-all.txt
508486
- restore_cache:
@@ -537,15 +515,6 @@ jobs:
537515
- store_artifacts:
538516
path: /tmp/dash_artifacts
539517

540-
table-server-react-18:
541-
<<: *table-server
542-
docker:
543-
- image: cimg/python:3.12.1-browsers
544-
environment:
545-
PYVERSION: python312
546-
PERCY_ENABLE: 0
547-
REACT_VERSION: "18.2.0"
548-
549518
table-unit-test:
550519
working_directory: ~/dash
551520
docker:
@@ -556,7 +525,11 @@ jobs:
556525
steps:
557526
- checkout:
558527
path: ~/dash
559-
- run: sudo apt-get update
528+
- run:
529+
name: Add chrome keys & update.
530+
command: |
531+
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
532+
sudo apt-get update
560533
- run: echo $PYVERSION > ver.txt
561534
- run: cat requirements/*.txt > requirements-all.txt
562535
- restore_cache:
@@ -598,7 +571,11 @@ jobs:
598571
steps:
599572
- checkout:
600573
path: ~/dash
601-
- run: sudo apt-get update
574+
- run:
575+
name: Add chrome keys & update.
576+
command: |
577+
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
578+
sudo apt-get update
602579
- restore_cache:
603580
key: dep-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}
604581
- browser-tools/install-browser-tools:
@@ -681,9 +658,6 @@ workflows:
681658
- test-312-async:
682659
requires:
683660
- install-dependencies-312
684-
- test-312-react-18:
685-
requires:
686-
- install-dependencies-312
687661
- test-38:
688662
requires:
689663
- install-dependencies-38
@@ -698,19 +672,13 @@ workflows:
698672
- dcc-312:
699673
requires:
700674
- install-dependencies-312
701-
- dcc-312-react-18:
702-
requires:
703-
- install-dependencies-312
704675
- dcc-38:
705676
requires:
706677
- install-dependencies-38
707678

708679
- html-312:
709680
requires:
710681
- install-dependencies-312
711-
- html-312-react-18:
712-
requires:
713-
- install-dependencies-312
714682
- html-38:
715683
requires:
716684
- install-dependencies-38
@@ -725,9 +693,6 @@ workflows:
725693
- table-server:
726694
requires:
727695
- install-dependencies-312
728-
- table-server-react-18:
729-
requires:
730-
- install-dependencies-312
731696

732697
- percy/finalize_all:
733698
requires:

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# These owners will be the default owners for everything in
22
# the repo. Unless a later match takes precedence
3-
* @alexcjohnson @T4rk1n @ndrezn @gvwilson @emilykl
3+
* @T4rk1n @ndrezn @gvwilson @emilykl

.pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ disable=fixme,
7575
unnecessary-lambda-assignment,
7676
broad-exception-raised,
7777
consider-using-generator,
78+
too-many-ancestors
7879

7980

8081
# Enable the message, report, category or checker with the given id(s). You can

@plotly/dash-generator-test-component-nested/src/components/MyNestedComponent.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react';
44
/**
55
* MyNestedComponent description
66
*/
7-
const MyNestedComponent = ({ id, value }) => (<div id={id}>{value}</div>);
7+
const MyNestedComponent = ({ id, value = '' }) => (<div id={id}>{value}</div>);
88

99
MyNestedComponent.propTypes = {
1010
/**
@@ -18,8 +18,4 @@ MyNestedComponent.propTypes = {
1818
value: PropTypes.string
1919
};
2020

21-
MyNestedComponent.defaultProps = {
22-
value: ''
23-
};
24-
2521
export default MyNestedComponent;

@plotly/dash-generator-test-component-standard/src/components/MyStandardComponent.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react';
44
/**
55
* MyComponent description
66
*/
7-
const MyStandardComponent = ({ id, style, value }) => (<div id={id} style={style}>{value}</div>);
7+
const MyStandardComponent = ({ id, style, value = '' }) => (<div id={id} style={style}>{value}</div>);
88

99
MyStandardComponent.propTypes = {
1010
/**
@@ -23,8 +23,4 @@ MyStandardComponent.propTypes = {
2323
value: PropTypes.string
2424
};
2525

26-
MyStandardComponent.defaultProps = {
27-
value: ''
28-
};
29-
30-
export default MyStandardComponent;
26+
export default MyStandardComponent;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignore_props = ['ignored_prop']

@plotly/dash-generator-test-component-typescript/base/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@
1616
dict(
1717
relative_package_path='dash_generator_test_component_typescript.js',
1818
namespace='dash_generator_test_component_typescript'
19-
)
19+
),
20+
{
21+
"dev_package_path": "proptypes.js",
22+
"dev_only": True,
23+
"namespace": 'dash_generator_test_component_typescript'
24+
}
2025
]
2126

2227
for _component in __all__:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignore_props = ['ignored_prop']

@plotly/dash-generator-test-component-typescript/generator.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,23 @@ describe('Test Typescript component metadata generation', () => {
271271
);
272272
expect(objectOfComponents).toBe("node");
273273
}
274+
);
275+
276+
test(
277+
'union and literal values', () => {
278+
const propType = R.path(
279+
propPath('TypeScriptComponent', 'union_enum').concat(
280+
'type'
281+
),
282+
metadata
283+
);
284+
expect(propType.name).toBe('union');
285+
expect(propType.value.length).toBe(3);
286+
expect(propType.value[0].name).toBe('number');
287+
expect(propType.value[1].name).toBe('literal');
288+
expect(propType.value[2].name).toBe('literal');
289+
expect(propType.value[1].value).toBe('small');
290+
}
274291
)
275292
});
276293

0 commit comments

Comments
 (0)