Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 2481ac4

Browse files
Update toolchain (#878)
1 parent e0264b7 commit 2481ac4

File tree

149 files changed

+24331
-19833
lines changed

Some content is hidden

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

149 files changed

+24331
-19833
lines changed

.circleci/config.yml

Lines changed: 29 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
11
version: 2.1
22

33
jobs:
4+
percy-finalize:
5+
docker:
6+
- image: percyio/agent
7+
steps:
8+
- run:
9+
name: Inject Percy Environment variables
10+
command: |
11+
echo 'export PERCY_TOKEN="$PERCY_TOKEN_E2E"' >> $BASH_ENV
12+
- run: percy finalize --all
13+
414
"server-test":
515
docker:
6-
- image: circleci/python:3.7.9-node-browsers
16+
- image: circleci/python:3.9.2-buster-node-browsers
717
environment:
818
PERCY_PARALLEL_TOTAL: -1
9-
- image: cypress/base:10
10-
19+
parallelism: 4
1120
steps:
1221
- checkout
1322
- run:
1423
name: Inject Percy Environment variables
1524
command: |
1625
echo 'export PERCY_TOKEN="$PERCY_TOKEN_E2E"' >> $BASH_ENV
17-
1826
- restore_cache:
1927
key: dep-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
2028
- run:
@@ -24,18 +32,15 @@ jobs:
2432
key: dep-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
2533
paths:
2634
- node_modules
27-
2835
- run:
2936
name: Install requirements
3037
command: |
31-
sudo pip install --upgrade virtualenv
32-
python -m venv venv || virtualenv venv
38+
python -m venv venv
3339
. venv/bin/activate
3440
pip install -r dev-requirements.txt --quiet
3541
git clone --depth 1 git@github.com:plotly/dash.git dash-main
3642
pip install -e ./dash-main[dev,testing] --quiet
3743
cd dash-main/dash-renderer && npm ci && npm run build && pip install -e . && cd ./../..
38-
3944
- run:
4045
name: Build
4146
command: |
@@ -45,112 +50,63 @@ jobs:
4550
python setup.py sdist
4651
cd dist
4752
find . -name "*.gz" | xargs pip install --no-cache-dir --ignore-installed && cd ..
48-
4953
- run:
5054
name: Run tests
5155
command: |
5256
. venv/bin/activate
53-
npm run test.server
54-
- run:
55-
name: 🦔 percy finalize
56-
command: npx percy finalize --all
57-
when: always
58-
59-
60-
"standalone-test":
61-
docker:
62-
- image: circleci/python:3.6.7-node-browsers
63-
- image: cypress/base:10
64-
65-
steps:
66-
- checkout
67-
- restore_cache:
68-
key: dep-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
69-
- run:
70-
name: Install npm packages
71-
command: npm ci
72-
- run:
73-
name: Cypress Install
74-
command: |
75-
$(npm bin)/cypress install
76-
77-
- save_cache:
78-
key: dep-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
79-
paths:
80-
- node_modules
81-
- /home/circleci/.cache/Cypress
82-
83-
- run:
84-
name: Run tests
85-
command: |
86-
rm -rf node_modules/cypress
87-
npm i cypress@3.4.1
88-
npm run test.standalone
89-
57+
TESTFILES=$(circleci tests glob "tests/selenium/**/test_*.py" | circleci tests split --split-by=timings)
58+
pytest --nopercyfinalize --junitxml=test-reports/junit_intg.xml ${TESTFILES}
59+
- store_artifacts:
60+
path: test-reports
61+
- store_test_results:
62+
path: test-reports
63+
- store_artifacts:
64+
path: /tmp/dash_artifacts
9065

9166
"unit-test":
9267
docker:
93-
- image: circleci/python:3.7.5-node-browsers
94-
- image: cypress/base:10
95-
68+
- image: circleci/python:3.9.2-buster-node-browsers
9669
steps:
9770
- checkout
9871
- restore_cache:
9972
key: dep-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
10073
- run:
10174
name: Install npm packages
10275
command: npm ci
103-
- run:
104-
name: Cypress Install
105-
command: |
106-
$(npm bin)/cypress install
107-
10876
- save_cache:
10977
key: dep-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
11078
paths:
11179
- node_modules
112-
- /home/circleci/.cache/Cypress
113-
11480
- run:
11581
name: Install requirements
11682
command: |
117-
sudo pip install --upgrade virtualenv
118-
python -m venv venv || virtualenv venv
83+
python -m venv venv
11984
. venv/bin/activate
12085
pip install -r dev-requirements.txt --quiet
12186
pip install --progress-bar off -e git+https://github.com/plotly/dash.git@dev#egg=dash[dev,testing]
122-
12387
- run:
12488
name: Run tests
12589
command: |
12690
. venv/bin/activate
127-
npm run build
12891
npm run test.unit
12992
130-
13193
"visual-test":
13294
docker:
133-
- image: circleci/node:10-browsers
134-
95+
- image: circleci/node:14-browsers
13596
steps:
13697
- checkout
137-
13898
- restore_cache:
13999
key: dep-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}
140-
141100
- run:
142101
name: Install package.json
143102
command: npm ci
144-
145103
- save_cache:
146104
key: dep-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}
147105
paths:
148106
- node_modules
149-
150107
- run:
151108
name: Run build:js
152109
command: npm run private::build:js
153-
154110
- run:
155111
name: Run visual tests
156112
command: npm run test.visual
@@ -159,34 +115,27 @@ jobs:
159115

160116
"node":
161117
docker:
162-
- image: circleci/python:3.7.5-node
163-
118+
- image: circleci/python:3.9.2-node
164119
steps:
165120
- checkout
166-
167121
- run:
168122
name: Create virtual env
169-
command: python -m venv || virtualenv venv
170-
123+
command: python -m venv venv
171124
- restore_cache:
172125
key: dep-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}
173-
174126
- run:
175127
name: Install package.json
176128
command: npm ci
177-
178129
- save_cache:
179130
key: dep-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }}
180131
paths:
181132
- node_modules
182-
183133
- run:
184134
name: Install requirements
185135
command: |
186136
. venv/bin/activate
187137
pip install -r dev-requirements.txt --quiet
188138
pip install --progress-bar off -e git+https://github.com/plotly/dash.git@dev#egg=dash[dev,testing]
189-
190139
- run:
191140
name: Run eslint
192141
command: |
@@ -200,6 +149,8 @@ workflows:
200149
jobs:
201150
- "node"
202151
- "server-test"
203-
- "standalone-test"
204152
- "unit-test"
205153
- "visual-test"
154+
- percy-finalize:
155+
requires:
156+
- server-test

.config/tslint.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

.config/webpack/base.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ module.exports = (options = {}) => {
2525
mode: mode,
2626
output: {
2727
path: path.resolve(__dirname, `./../../${dashLibraryName}`),
28-
chunkFilename: '[name].js',
2928
filename: '[name].js',
3029
library: dashLibraryName,
3130
libraryTarget: 'window'
@@ -40,15 +39,18 @@ module.exports = (options = {}) => {
4039
rules: [
4140
{
4241
test: /demo[\\\/]index.html?$/,
43-
loader: 'file-loader?name=index.[ext]'
42+
loader: 'file-loader',
43+
options: {
44+
name: 'index.[ext]'
45+
}
4446
},
4547
{
4648
test: /\.csv$/,
4749
loader: 'raw-loader'
4850
},
4951
{
5052
test: /\.ts(x?)$/,
51-
include: /node_modules[\\\/](highlight[.]js)[\\\/]/,
53+
include: /node_modules[\\\/](highlight[.]js|d3-format)[\\\/]/,
5254
use: [
5355
{ loader: 'babel-loader', options: babel },
5456
{ loader: 'ts-loader', options: ts },
@@ -65,7 +67,7 @@ module.exports = (options = {}) => {
6567
},
6668
{
6769
test: /\.js$/,
68-
include: /node_modules[\\\/](highlight[.]js)[\\\/]/,
70+
include: /node_modules[\\\/](highlight[.]js|d3-format)[\\\/]/,
6971
use: [
7072
{ loader: 'babel-loader', options: babel }
7173
]
@@ -97,7 +99,6 @@ module.exports = (options = {}) => {
9799
},
98100
resolve: {
99101
alias: {
100-
cypress: path.resolve('./tests/cypress/src'),
101102
'dash-table': path.resolve('./src/dash-table'),
102103
demo: path.resolve('./demo'),
103104
core: path.resolve('./src/core'),
@@ -108,7 +109,7 @@ module.exports = (options = {}) => {
108109
optimization: {
109110
splitChunks: {
110111
chunks: 'async',
111-
name: true,
112+
name: '[name].js',
112113
cacheGroups: {
113114
async: {
114115
chunks: 'async',

.eslintrc

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"extends": [
3+
"plugin:@typescript-eslint/recommended",
4+
"prettier"
5+
],
6+
"plugins": [
7+
"@typescript-eslint"
8+
],
9+
"parserOptions": {
10+
"project": "./tsconfig.lint.json"
11+
},
12+
"rules": {
13+
"arrow-parens": [
14+
2,
15+
"as-needed"
16+
],
17+
"comma-dangle": [
18+
2,
19+
"never"
20+
],
21+
"no-unused-expressions": 2,
22+
"no-unused-vars": 0,
23+
"prefer-arrow-callback": 2,
24+
"quote-props": [
25+
2,
26+
"as-needed"
27+
],
28+
"quotes": [
29+
2,
30+
"single",
31+
{ "avoidEscape": true }
32+
],
33+
"@typescript-eslint/ban-types": 0,
34+
"@typescript-eslint/explicit-module-boundary-types": 0,
35+
"@typescript-eslint/array-type": 0,
36+
"@typescript-eslint/eofline": 0,
37+
"@typescript-eslint/max-classes-per-file": 0,
38+
"@typescript-eslint/max-line-length": 0,
39+
"@typescript-eslint/member-access": 0,
40+
"@typescript-eslint/member-ordering": 0,
41+
"@typescript-eslint/no-conditional-assignment": 0,
42+
"@typescript-eslint/no-empty": 0,
43+
"@typescript-eslint/no-empty-function": 0,
44+
"@typescript-eslint/no-empty-interface": 0,
45+
"@typescript-eslint/no-explicit-any": 0,
46+
"@typescript-eslint/no-unused-vars": [2, { "argsIgnorePattern": "_" }],
47+
"@typescript-eslint/object-literal-sort-keys": 0,
48+
"@typescript-eslint/object-literal-shorthand": 0,
49+
"@typescript-eslint/ordered-imports": 0,
50+
"@typescript-eslint/prefer-const": 0,
51+
"@typescript-eslint/prefer-for-of": 0,
52+
"@typescript-eslint/space-before-function-paren": [
53+
0,
54+
"always"
55+
],
56+
"@typescript-eslint/unified-signatures": 0,
57+
"@typescript-eslint/variable-name": 0
58+
}
59+
}

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
ignore = C901, E203, E266, E501, E731, W503
2+
ignore = C901, E203, E231, E266, E501, E731, W503
33
select = B,C,E,F,W,T4
44
per-file-ignores =
55
tests/*: E722, F811

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Project.toml
1717

1818
# testing
1919
/coverage
20-
/tests/cypress/screenshots/**
2120
/storybook-static/**
2221

2322
# misc

.storybook/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@ const baseConfig = require('./../.config/webpack/base.js')({
1212
});
1313

1414
module.exports = {
15+
core: { builder: 'webpack5' },
1516
stories: ['./../tests/visual/percy-storybook/**/*.percy.tsx'],
1617
webpackFinal: async (config, { configType }) => {
1718
// jerry rig everything
1819
config.resolve.alias.core = path.resolve(__dirname, './../src/core'),
1920
config.resolve.alias['dash-table'] = path.resolve(__dirname, './../src/dash-table')
2021

2122
config.module = baseConfig.module;
23+
config.stats = {
24+
warnings: true
25+
};
2226

2327
return config;
2428
}

cypress.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)