diff --git a/.circleci/config.yml b/.circleci/config.yml index 32e27a37aa9..b66d1326d15 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -217,11 +217,12 @@ jobs: make-baselines-virtual-webgl: parallelism: 8 docker: - - image: circleci/python:3.8.9 + - image: cimg/python:3.12.11 working_directory: ~/plotly.js steps: - attach_workspace: at: ~/ + - run: sudo apt-get update - run: name: Install kaleido, plotly.io and required fonts command: .circleci/env_image.sh @@ -235,11 +236,12 @@ jobs: make-baselines-mathjax3: docker: - - image: circleci/python:3.8.9 + - image: cimg/python:3.12.11 working_directory: ~/plotly.js steps: - attach_workspace: at: ~/ + - run: sudo apt-get update - run: name: Install kaleido, plotly.io and required fonts command: .circleci/env_image.sh @@ -254,11 +256,12 @@ jobs: make-baselines: parallelism: 12 docker: - - image: circleci/python:3.8.9 + - image: cimg/python:3.12.11 working_directory: ~/plotly.js steps: - attach_workspace: at: ~/ + - run: sudo apt-get update - run: name: Install kaleido, plotly.io and required fonts command: .circleci/env_image.sh @@ -273,11 +276,12 @@ jobs: make-baselines-b64: parallelism: 12 docker: - - image: circleci/python:3.8.9 + - image: cimg/python:3.12.11 working_directory: ~/plotly.js steps: - attach_workspace: at: ~/ + - run: sudo apt-get update - run: name: Install kaleido, plotly.io and required fonts command: .circleci/env_image.sh @@ -347,11 +351,12 @@ jobs: make-exports: docker: - - image: circleci/python:3.8.9 + - image: cimg/python:3.12.11 working_directory: ~/plotly.js steps: - attach_workspace: at: ~/ + - run: sudo apt-get update - run: name: Install kaleido, plotly.io and required fonts command: .circleci/env_image.sh @@ -362,7 +367,7 @@ jobs: sudo apt-get install poppler-utils - run: name: Create svg, jpg, jpeg, webp, pdf and eps files - command: python3 test/image/make_exports.py + command: sudo python3 test/image/make_exports.py - persist_to_workspace: root: ~/ paths: @@ -488,7 +493,7 @@ jobs: - store_artifacts: path: stackgl_modules/index.js destination: stackgl_modules/index.js - + test-topojson-build: docker: - image: cimg/node:18.20.4 diff --git a/.circleci/env_image.sh b/.circleci/env_image.sh index 47b5d530545..17e2f5bfa26 100755 --- a/.circleci/env_image.sh +++ b/.circleci/env_image.sh @@ -2,10 +2,20 @@ set -e # install required fonts sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji + +# install pip +sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py +sudo python3 get-pip.py + +# install additional fonts +sudo python3 -m pip install requests sudo python3 .circleci/download_google_fonts.py sudo cp -r .circleci/fonts/ /usr/share/ +sudo apt install fontconfig sudo fc-cache -f + # install kaleido & plotly -sudo python3 -m pip install kaleido==0.2.1 plotly==5.5.0 --progress-bar off +sudo python3 -m pip install kaleido==0.2.1 plotly==6.2.0 --progress-bar off + # install numpy i.e. to convert arrays to typed arrays sudo python3 -m pip install numpy==1.24.2 diff --git a/.circleci/test.sh b/.circleci/test.sh index b814c1dd3e8..4fc876018b8 100755 --- a/.circleci/test.sh +++ b/.circleci/test.sh @@ -97,24 +97,24 @@ case $1 in find $ROOT/test/image/mocks/gl* -type f -printf "%f\n"; \ find $ROOT/test/image/mocks/map* -type f -printf "%f\n"; \ } | sed 's/\.json$//1' | circleci tests split) - python3 test/image/make_baseline.py virtual-webgl $SUITE || EXIT_STATE=$? + sudo python3 test/image/make_baseline.py virtual-webgl $SUITE || EXIT_STATE=$? exit $EXIT_STATE ;; make-baselines-mathjax3) - python3 test/image/make_baseline.py mathjax3 legend_mathjax_title_and_items mathjax parcats_grid_subplots table_latex_multitrace_scatter table_plain_birds table_wrapped_birds ternary-mathjax ternary-mathjax-title-place-subtitle || EXIT_STATE=$? + sudo python3 test/image/make_baseline.py mathjax3 legend_mathjax_title_and_items mathjax parcats_grid_subplots table_latex_multitrace_scatter table_plain_birds table_wrapped_birds ternary-mathjax ternary-mathjax-title-place-subtitle || EXIT_STATE=$? exit $EXIT_STATE ;; make-baselines-b64) SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | sed 's/\.json$//1' | circleci tests split) - python3 test/image/make_baseline.py b64 $SUITE || EXIT_STATE=$? + sudo python3 test/image/make_baseline.py b64 $SUITE || EXIT_STATE=$? exit $EXIT_STATE ;; make-baselines) SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | sed 's/\.json$//1' | circleci tests split) - python3 test/image/make_baseline.py $SUITE || EXIT_STATE=$? + sudo python3 test/image/make_baseline.py $SUITE || EXIT_STATE=$? exit $EXIT_STATE ;; diff --git a/test/image/baselines/14.png b/test/image/baselines/14.png index ce59b527c1b..f7359f8310e 100644 Binary files a/test/image/baselines/14.png and b/test/image/baselines/14.png differ diff --git a/test/image/baselines/gl3d_world-cals.png b/test/image/baselines/gl3d_world-cals.png index 23c3ddfb28f..55e980e8ea3 100644 Binary files a/test/image/baselines/gl3d_world-cals.png and b/test/image/baselines/gl3d_world-cals.png differ diff --git a/test/image/baselines/japanese.png b/test/image/baselines/japanese.png index d716d6bb088..651c8d4b1a4 100644 Binary files a/test/image/baselines/japanese.png and b/test/image/baselines/japanese.png differ diff --git a/test/image/baselines/mathjax3___parcats_grid_subplots.png b/test/image/baselines/mathjax3___parcats_grid_subplots.png index c00175ae64a..0d485e0b574 100644 Binary files a/test/image/baselines/mathjax3___parcats_grid_subplots.png and b/test/image/baselines/mathjax3___parcats_grid_subplots.png differ diff --git a/test/image/baselines/mathjax3___table_latex_multitrace_scatter.png b/test/image/baselines/mathjax3___table_latex_multitrace_scatter.png index 094b1dafa06..3e59e955334 100644 Binary files a/test/image/baselines/mathjax3___table_latex_multitrace_scatter.png and b/test/image/baselines/mathjax3___table_latex_multitrace_scatter.png differ diff --git a/test/image/baselines/mathjax3___table_plain_birds.png b/test/image/baselines/mathjax3___table_plain_birds.png index 7ecf490e622..c99b4ea88b1 100644 Binary files a/test/image/baselines/mathjax3___table_plain_birds.png and b/test/image/baselines/mathjax3___table_plain_birds.png differ diff --git a/test/image/baselines/parcats_grid_subplots.png b/test/image/baselines/parcats_grid_subplots.png index ed385b2034b..7bfc47557dd 100644 Binary files a/test/image/baselines/parcats_grid_subplots.png and b/test/image/baselines/parcats_grid_subplots.png differ diff --git a/test/image/baselines/round-worldcup.png b/test/image/baselines/round-worldcup.png index 586622673b7..784f8553528 100644 Binary files a/test/image/baselines/round-worldcup.png and b/test/image/baselines/round-worldcup.png differ diff --git a/test/image/baselines/table_latex_multitrace_scatter.png b/test/image/baselines/table_latex_multitrace_scatter.png index 63b4481d770..5959e91696a 100644 Binary files a/test/image/baselines/table_latex_multitrace_scatter.png and b/test/image/baselines/table_latex_multitrace_scatter.png differ diff --git a/test/image/baselines/table_plain_birds.png b/test/image/baselines/table_plain_birds.png index 67d2742e952..0a0be251b1d 100644 Binary files a/test/image/baselines/table_plain_birds.png and b/test/image/baselines/table_plain_birds.png differ diff --git a/test/image/baselines/worldcup.png b/test/image/baselines/worldcup.png index 204a756c3f8..043d310453b 100644 Binary files a/test/image/baselines/worldcup.png and b/test/image/baselines/worldcup.png differ diff --git a/test/image/export_test.js b/test/image/export_test.js index d5caded09ad..92264ded4cb 100644 --- a/test/image/export_test.js +++ b/test/image/export_test.js @@ -8,7 +8,7 @@ var getImagePaths = require('./assets/get_image_paths'); // image formats to test // // N.B. 'png' is tested in `npm run test-image, no need to duplicate here -var FORMATS = ['svg', 'jpg', 'jpeg', 'webp', 'eps', 'pdf']; +var FORMATS = ['svg', 'jpg', 'jpeg', 'webp', 'pdf']; var ONLY_FILE_SIZE = ['eps', 'pdf']; diff --git a/test/image/make_exports.py b/test/image/make_exports.py index ea8a4efe7f1..279439af1e4 100644 --- a/test/image/make_exports.py +++ b/test/image/make_exports.py @@ -10,7 +10,7 @@ pio.templates.default = 'none' pio.kaleido.scope.plotlyjs = os.path.join(root, 'build', 'plotly.js') -allFormats = ['svg', 'jpg', 'jpeg', 'webp', 'eps', 'pdf'] +allFormats = ['svg', 'jpg', 'jpeg', 'webp', 'pdf'] # 'png' is tested by image-test allNames = [