Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
switch env_image.sh to uv
  • Loading branch information
emilykl committed Nov 19, 2025
commit 5a9970f14dd4e28267e4aa76e233ffd870c5d97a
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ jobs:
sudo apt-get install poppler-utils
- run:
name: Create svg, jpg, jpeg, webp, pdf and eps files
command: sudo python3 test/image/make_exports.py
command: uv run test/image/make_exports.py
- persist_to_workspace:
root: ~/
paths:
Expand Down
20 changes: 11 additions & 9 deletions .circleci/env_image.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
#!/bin/sh
#!/bin/bash
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
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate

# install additional fonts
sudo python3 -m pip install requests
sudo python3 .circleci/download_google_fonts.py
uv pip install requests
python .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 "plotly==6.5" "kaleido==1.2" --progress-bar off
uv pip install "plotly==6.5" "kaleido==1.2" --no-progress

# install numpy i.e. to convert arrays to typed arrays
sudo python3 -m pip install "numpy==2.3" --progress-bar off
uv pip install "numpy==2.3" --no-progress

# verify versions of installed python packages
sudo python3 -m pip freeze
# verify version of python and versions of installed python packages
python --version
uv pip freeze
8 changes: 4 additions & 4 deletions .circleci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
sudo python3 test/image/make_baseline.py virtual-webgl $SUITE || EXIT_STATE=$?
uv run test/image/make_baseline.py virtual-webgl $SUITE || EXIT_STATE=$?
exit $EXIT_STATE
;;

make-baselines-mathjax3)
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=$?
uv run 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)
sudo python3 test/image/make_baseline.py b64 $SUITE || EXIT_STATE=$?
uv run 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)
sudo python3 test/image/make_baseline.py $SUITE || EXIT_STATE=$?
uv run test/image/make_baseline.py $SUITE || EXIT_STATE=$?
exit $EXIT_STATE
;;

Expand Down
Loading