Skip to content

Fix map and browser-tools errors in CI #7365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2.1
orbs:
browser-tools: circleci/browser-tools@1.4.8
browser-tools: circleci/browser-tools@1.5.1

# Inspired by:
# https://github.com/CircleCI-Public/circleci-demo-workflows/blob/workspace-forwarding/.circleci/config.yml
Expand Down
Binary file modified test/image/baselines/map_layers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/pattern_fgcolor_overlay_fillmode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/sunburst_coffee.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/treemap_sunburst_marker_colors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 1 addition & 16 deletions test/image/compare_pixels_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,11 @@ argv._.forEach(function(pattern) {
var blacklist = [
'map_angles',
'map_stamen-style',
'mapbox_stamen-style',
'mapbox_custom-style',
'mapbox_density0-legend',
'mapbox_osm-style',
];

if(virtualWebgl) {
allMockList = allMockList.filter(function(a) {
return a.slice(0, 2) === 'gl' || a.slice(0, 6) === 'mapbox';
return a.slice(0, 2) === 'gl';
});
}

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

var isMapbox = mockName.substr(0, 7) === 'mapbox_';

// We have to skip mapbox since Aug 2024
// See https://github.com/plotly/plotly.js/issues/7075
if(isMapbox) continue;

var flakyMap = [
// more flaky
'map_density0-legend',
'map_osm-style',
'map_predefined-styles1',
'map_predefined-styles2',

'mapbox_angles',
'mapbox_layers',
'mapbox_custom-style',
'mapbox_geojson-attributes'
].indexOf(mockName) !== -1;

var otherFlaky = [
Expand Down
1 change: 0 additions & 1 deletion test/image/export_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ var DEFAULT_LIST = [
'image_astronaut_source',
'gl2d_no-clustering2',
'gl3d_surface-heatmap-treemap_transparent-colorscale',
'mapbox_density-multiple_legend',
'map_density-multiple_legend',
'smith_modes',
'zsmooth_methods',
Expand Down
8 changes: 0 additions & 8 deletions test/image/make_baseline.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@
pio.kaleido.scope.plotlyjs = plotlyjs
pio.templates.default = 'none'

_credentials = open(os.path.join(root, 'build', 'credentials.json'), 'r')
pio.kaleido.scope.mapbox_access_token = json.load(_credentials)['MAPBOX_ACCESS_TOKEN']
_credentials.close()

ALL_MOCKS = [os.path.splitext(a)[0] for a in os.listdir(dirIn) if a.endswith('.json')]
ALL_MOCKS.sort()

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

Expand Down
5 changes: 0 additions & 5 deletions test/image/make_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
pio.templates.default = 'none'
pio.kaleido.scope.plotlyjs = os.path.join(root, 'build', 'plotly.js')

_credentials = open(os.path.join(root, 'build', 'credentials.json'), 'r')
pio.kaleido.scope.mapbox_access_token = json.load(_credentials)['MAPBOX_ACCESS_TOKEN']
_credentials.close()

allFormats = ['svg', 'jpg', 'jpeg', 'webp', 'eps', 'pdf']
# 'png' is tested by image-test

Expand All @@ -27,7 +23,6 @@
'image_astronaut_source',
'gl2d_no-clustering2',
'gl3d_surface-heatmap-treemap_transparent-colorscale',
'mapbox_density-multiple_legend',
'map_density-multiple_legend',
'smith_modes',
'zsmooth_methods',
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/map_layers.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
{
"sourcetype": "raster",
"source": [
"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"
"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"
],
"below": "aeroway-line"
},
Expand Down
9 changes: 1 addition & 8 deletions test/jasmine/assets/mock_lists.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ var glMockList = [
['gl3d_volume_multiple-traces', require('../../image/mocks/gl3d_volume_multiple-traces.json')]
];

var mapboxMockList = [
['scattermapbox', require('../../image/mocks/mapbox_bubbles-text.json')],
['choroplethmapbox', require('../../image/mocks/mapbox_choropleth0.json')],
['densitymapbox', require('../../image/mocks/mapbox_density0.json')]
];

var mapMockList = [
['scattermap', require('../../image/mocks/map_bubbles-text.json')],
['choroplethmap', require('../../image/mocks/map_choropleth0.json')],
Expand All @@ -83,7 +77,6 @@ var mapMockList = [
module.exports = {
svg: svgMockList,
gl: glMockList,
mapbox: mapboxMockList,
map: mapMockList,
all: svgMockList.concat(glMockList).concat(mapboxMockList).concat(mapMockList)
all: svgMockList.concat(glMockList).concat(mapMockList)
};
Loading