Skip to content

Commit 0667ef5

Browse files
committed
fetched master
2 parents c611b63 + ceb119f commit 0667ef5

File tree

643 files changed

+226545
-170782
lines changed

Some content is hidden

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

643 files changed

+226545
-170782
lines changed

.circleci/config.yml

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ version: 2.0
1010
jobs:
1111
build:
1212
docker:
13-
- image: circleci/node:8.9.4
13+
- image: circleci/node:10.9.0
1414
working_directory: ~/plotly.js
1515
steps:
1616
- checkout
@@ -47,33 +47,25 @@ jobs:
4747
test-jasmine:
4848
docker:
4949
# need '-browsers' version to test in real (xvfb-wrapped) browsers
50-
- image: circleci/node:8.9.4-browsers
50+
- image: circleci/node:10.9.0-browsers
5151
working_directory: ~/plotly.js
5252
steps:
5353
- checkout
5454
- attach_workspace:
5555
at: ~/plotly.js
56-
- run:
57-
name: Set timezone to Alaska time (arbitrary timezone to test date logic)
58-
command: |
59-
sudo cp /usr/share/zoneinfo/America/Anchorage /etc/localtime
6056
- run:
6157
name: Run jasmine tests (batch 1)
6258
command: ./.circleci/test.sh jasmine
6359

6460
test-jasmine2:
6561
docker:
6662
# need '-browsers' version to test in real (xvfb-wrapped) browsers
67-
- image: circleci/node:8.9.4-browsers
63+
- image: circleci/node:10.9.0-browsers
6864
working_directory: ~/plotly.js
6965
steps:
7066
- checkout
7167
- attach_workspace:
7268
at: ~/plotly.js
73-
- run:
74-
name: Set timezone to Alaska time (arbitrary timezone to test date logic)
75-
command: |
76-
sudo cp /usr/share/zoneinfo/America/Anchorage /etc/localtime
7769
- run:
7870
name: Run jasmine tests (batch 2)
7971
command: ./.circleci/test.sh jasmine2
@@ -96,6 +88,7 @@ jobs:
9688
command: ./.circleci/test.sh image
9789
- store_artifacts:
9890
path: build
91+
destination: /
9992

10093
test-image2:
10194
docker:
@@ -115,10 +108,11 @@ jobs:
115108
command: ./.circleci/test.sh image2
116109
- store_artifacts:
117110
path: build
111+
destination: /
118112

119113
test-syntax:
120114
docker:
121-
- image: circleci/node:8.9.4
115+
- image: circleci/node:10.9.0
122116
working_directory: ~/plotly.js
123117
steps:
124118
- checkout
@@ -128,6 +122,34 @@ jobs:
128122
name: Run syntax tests
129123
command: ./.circleci/test.sh syntax
130124

125+
publish:
126+
docker:
127+
- image: circleci/node:10.9.0
128+
working_directory: ~/plotly.js
129+
steps:
130+
- checkout
131+
- attach_workspace:
132+
at: ~/plotly.js
133+
- run:
134+
name: Update plot-schema.json
135+
command: node tasks/bundle_plot_schema.js
136+
- store_artifacts:
137+
path: build/plotly.js
138+
destination: /plotly.js
139+
- store_artifacts:
140+
path: dist/plotly.min.js
141+
destination: /plotly.min.js
142+
- store_artifacts:
143+
path: dist/plot-schema.json
144+
destination: /plot-schema.json
145+
- run:
146+
name: Show URLs to build files
147+
command: |
148+
PROJECT_NUM=45646037
149+
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/plotly.js
150+
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/plotly.min.js
151+
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/plot-schema.json
152+
131153
workflows:
132154
version: 2
133155
build-and-test:
@@ -148,3 +170,6 @@ workflows:
148170
- test-syntax:
149171
requires:
150172
- build
173+
- publish:
174+
requires:
175+
- build

.circleci/test.sh

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,62 @@
44
set +e
55
set +o pipefail
66

7+
ROOT=$(dirname $0)/..
78
EXIT_STATE=0
89
MAX_AUTO_RETRY=5
910

11+
log () {
12+
echo -e "\n$1"
13+
}
14+
1015
# inspired by https://unix.stackexchange.com/a/82602
1116
retry () {
12-
local n=0
17+
local n=1
1318

1419
until [ $n -ge $MAX_AUTO_RETRY ]; do
15-
"$@" && break
20+
"$@" --failFast && break
21+
log "run $n of $MAX_AUTO_RETRY failed, trying again ..."
1622
n=$[$n+1]
17-
echo ''
18-
echo run $n of $MAX_AUTO_RETRY failed, trying again ...
19-
echo ''
20-
sleep 15
2123
done
2224

2325
if [ $n -eq $MAX_AUTO_RETRY ]; then
26+
log "one last time, w/o failing fast"
27+
"$@" && n=0
28+
fi
29+
30+
if [ $n -eq $MAX_AUTO_RETRY ]; then
31+
log "all $n runs failed, moving on."
2432
EXIT_STATE=1
2533
fi
2634
}
2735

36+
# set timezone to Alaska time (arbitrary timezone to test date logic)
37+
set_tz () {
38+
sudo cp /usr/share/zoneinfo/America/Anchorage /etc/localtime
39+
export TZ='America/Anchorage'
40+
}
41+
2842
case $1 in
2943

3044
jasmine)
45+
set_tz
46+
3147
npm run test-jasmine -- --skip-tags=gl,noCI,flaky || EXIT_STATE=$?
48+
retry npm run test-jasmine -- --tags=flaky --skip-tags=noCI
49+
npm run test-bundle || EXIT_STATE=$?
50+
3251
exit $EXIT_STATE
3352
;;
3453

3554
jasmine2)
36-
retry npm run test-jasmine -- --tags=gl --skip-tags=noCI,flaky
37-
retry npm run test-jasmine -- --tags=flaky --skip-tags=noCI
38-
npm run test-bundle || EXIT_STATE=$?
55+
set_tz
56+
57+
SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --tag=gl))
58+
59+
for s in ${SHARDS[@]}; do
60+
retry npm run test-jasmine -- "$s" --tags=gl --skip-tags=noCI
61+
done
62+
3963
exit $EXIT_STATE
4064
;;
4165

.github/ISSUE_TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Bug reports **must** be accompanied with a reproducible example. We recommend us
66

77
If you don't know JavaScript and still want to help us by reporting a bug, please attach the `"data"` and `"layout"` attributes that describe your graph and updates (if required to detect the bug). One way to retrieve your graph's data and layout attributes is by exporting your graph to [Plotly Cloud](http://plot.ly/). To do so, click on the _Edit in Chart Studio_ mode bar button (the 2nd one from the left by default) and follow these [instructions](https://help.plot.ly/save-share-and-export-in-plotly/), or watch this [screencast](https://community.plot.ly/t/mega-sharing-graphs-with-chart-studio/8869).
88

9+
Issues found on the example pages from https://plot.ly/javascript/ should be filed in our [documentation repo](https://github.com/plotly/documentation/issues) with the exception of https://plot.ly/javascript/reference which should be filed here.
10+
911
Note that GitHub issues are reserved for bug reports and feature requests only. Implementation questions should be asked on community.plot.ly (tagged [`plotly-js`](http://community.plot.ly/c/plotly-js)) or on Stack Overflow (tagged [`plotly`](https://stackoverflow.com/questions/tagged/plotly)).
1012

1113
Comments on GitHub issues or pull requests should add content to the discussions. Approbation comments such as *+1* or *I would like this feature to be implemented as well* will be deleted by the maintainers. Please use [GitHub reactions](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) instead.

BUILDING.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,6 @@ then simply run,
4040
browserify index.js > bundle.js
4141
```
4242

43-
to trim meta information (and thus save a few bytes), run:
44-
45-
46-
```
47-
browserify -t path/to/plotly.js/tasks/util/compress_attributes.js index.js > bundle.js
48-
```
49-
5043
## Angular CLI
5144

5245
Currently Angular CLI uses Webpack under the hood to bundle and build your Angular application.

0 commit comments

Comments
 (0)