Skip to content

Commit 24478b5

Browse files
authored
Merge pull request #7365 from plotly/fix-ci
Fix map and browser-tools errors in CI
2 parents 5363cf8 + 735e61e commit 24478b5

18 files changed

+8
-5156
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2.1
22
orbs:
3-
browser-tools: circleci/browser-tools@1.4.8
3+
browser-tools: circleci/browser-tools@1.5.1
44

55
# Inspired by:
66
# https://github.com/CircleCI-Public/circleci-demo-workflows/blob/workspace-forwarding/.circleci/config.yml

test/image/baselines/map_layers.png

102 KB
Loading
Loading
-1 Bytes
Loading
Loading

test/image/compare_pixels_test.js

+1-16
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,11 @@ argv._.forEach(function(pattern) {
6363
var blacklist = [
6464
'map_angles',
6565
'map_stamen-style',
66-
'mapbox_stamen-style',
67-
'mapbox_custom-style',
68-
'mapbox_density0-legend',
69-
'mapbox_osm-style',
7066
];
7167

7268
if(virtualWebgl) {
7369
allMockList = allMockList.filter(function(a) {
74-
return a.slice(0, 2) === 'gl' || a.slice(0, 6) === 'mapbox';
70+
return a.slice(0, 2) === 'gl';
7571
});
7672
}
7773

@@ -108,23 +104,12 @@ for(var i = 0; i < allMockList.length; i++) {
108104
// skip blacklist
109105
if(blacklist.indexOf(mockName) !== -1) continue;
110106

111-
var isMapbox = mockName.substr(0, 7) === 'mapbox_';
112-
113-
// We have to skip mapbox since Aug 2024
114-
// See https://github.com/plotly/plotly.js/issues/7075
115-
if(isMapbox) continue;
116-
117107
var flakyMap = [
118108
// more flaky
119109
'map_density0-legend',
120110
'map_osm-style',
121111
'map_predefined-styles1',
122112
'map_predefined-styles2',
123-
124-
'mapbox_angles',
125-
'mapbox_layers',
126-
'mapbox_custom-style',
127-
'mapbox_geojson-attributes'
128113
].indexOf(mockName) !== -1;
129114

130115
var otherFlaky = [

test/image/export_test.js

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ var DEFAULT_LIST = [
2626
'image_astronaut_source',
2727
'gl2d_no-clustering2',
2828
'gl3d_surface-heatmap-treemap_transparent-colorscale',
29-
'mapbox_density-multiple_legend',
3029
'map_density-multiple_legend',
3130
'smith_modes',
3231
'zsmooth_methods',

test/image/make_baseline.py

-8
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@
5555
pio.kaleido.scope.plotlyjs = plotlyjs
5656
pio.templates.default = 'none'
5757

58-
_credentials = open(os.path.join(root, 'build', 'credentials.json'), 'r')
59-
pio.kaleido.scope.mapbox_access_token = json.load(_credentials)['MAPBOX_ACCESS_TOKEN']
60-
_credentials.close()
61-
6258
ALL_MOCKS = [os.path.splitext(a)[0] for a in os.listdir(dirIn) if a.endswith('.json')]
6359
ALL_MOCKS.sort()
6460

@@ -70,10 +66,6 @@
7066
# unable to generate baselines for the following mocks
7167
blacklist = [
7268
'map_stamen-style',
73-
'mapbox_density0-legend',
74-
'mapbox_osm-style',
75-
'mapbox_stamen-style', # Could pass by setting mapboxAccessToken to a stadiamaps.com token
76-
'mapbox_custom-style' # Figure out why needed this in https://github.com/plotly/plotly.js/pull/6610
7769
]
7870
allNames = [a for a in allNames if a not in blacklist]
7971

test/image/make_exports.py

-5
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
pio.templates.default = 'none'
1111
pio.kaleido.scope.plotlyjs = os.path.join(root, 'build', 'plotly.js')
1212

13-
_credentials = open(os.path.join(root, 'build', 'credentials.json'), 'r')
14-
pio.kaleido.scope.mapbox_access_token = json.load(_credentials)['MAPBOX_ACCESS_TOKEN']
15-
_credentials.close()
16-
1713
allFormats = ['svg', 'jpg', 'jpeg', 'webp', 'eps', 'pdf']
1814
# 'png' is tested by image-test
1915

@@ -27,7 +23,6 @@
2723
'image_astronaut_source',
2824
'gl2d_no-clustering2',
2925
'gl3d_surface-heatmap-treemap_transparent-colorscale',
30-
'mapbox_density-multiple_legend',
3126
'map_density-multiple_legend',
3227
'smith_modes',
3328
'zsmooth_methods',

test/image/mocks/map_layers.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
{
190190
"sourcetype": "raster",
191191
"source": [
192-
"https://img.nj.gov/imagerywms/Natural2015?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&transparent=true&width=256&height=256&layers=Natural2015"
192+
"https://basemap.nationalmap.gov/arcgis/services/USGSImageryOnly/MapServer/WMSServer?bbox={bbox-epsg-3857}&format=image/png&service=WMS&request=GetMap&crs=EPSG:3857&transparent=true&width=256&height=256&version=1.3.0&layers=0&styles=default"
193193
],
194194
"below": "aeroway-line"
195195
},

test/jasmine/assets/mock_lists.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,6 @@ var glMockList = [
6868
['gl3d_volume_multiple-traces', require('../../image/mocks/gl3d_volume_multiple-traces.json')]
6969
];
7070

71-
var mapboxMockList = [
72-
['scattermapbox', require('../../image/mocks/mapbox_bubbles-text.json')],
73-
['choroplethmapbox', require('../../image/mocks/mapbox_choropleth0.json')],
74-
['densitymapbox', require('../../image/mocks/mapbox_density0.json')]
75-
];
76-
7771
var mapMockList = [
7872
['scattermap', require('../../image/mocks/map_bubbles-text.json')],
7973
['choroplethmap', require('../../image/mocks/map_choropleth0.json')],
@@ -83,7 +77,6 @@ var mapMockList = [
8377
module.exports = {
8478
svg: svgMockList,
8579
gl: glMockList,
86-
mapbox: mapboxMockList,
8780
map: mapMockList,
88-
all: svgMockList.concat(glMockList).concat(mapboxMockList).concat(mapMockList)
81+
all: svgMockList.concat(glMockList).concat(mapMockList)
8982
};

0 commit comments

Comments
 (0)