Skip to content

Commit 5b72a56

Browse files
committed
switch env_image.sh to uv
1 parent 0184bd4 commit 5b72a56

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

.circleci/env_image.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
set -e
33
# install required fonts
44
sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji
55

66
# install pip
7-
sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
8-
sudo python3 get-pip.py
7+
curl -LsSf https://astral.sh/uv/install.sh | sh
8+
uv venv
9+
source .venv/bin/activate
910

1011
# install additional fonts
11-
sudo python3 -m pip install requests
12-
sudo python3 .circleci/download_google_fonts.py
12+
uv pip install requests
13+
python .circleci/download_google_fonts.py
1314
sudo cp -r .circleci/fonts/ /usr/share/
1415
sudo apt install fontconfig
1516
sudo fc-cache -f
1617

1718
# install kaleido & plotly
18-
sudo python3 -m pip install "plotly==6.5" "kaleido==1.2" --progress-bar off
19+
uv pip install "plotly==6.5" "kaleido==1.2" --no-progress
1920

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

23-
# verify versions of installed python packages
24-
sudo python3 -m pip freeze
24+
# verify version of python and versions of installed python packages
25+
python --version
26+
uv pip freeze

.circleci/test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,24 +97,24 @@ case $1 in
9797
find $ROOT/test/image/mocks/gl* -type f -printf "%f\n"; \
9898
find $ROOT/test/image/mocks/map* -type f -printf "%f\n"; \
9999
} | sed 's/\.json$//1' | circleci tests split)
100-
sudo python3 test/image/make_baseline.py virtual-webgl $SUITE || EXIT_STATE=$?
100+
uv run test/image/make_baseline.py virtual-webgl $SUITE || EXIT_STATE=$?
101101
exit $EXIT_STATE
102102
;;
103103

104104
make-baselines-mathjax3)
105-
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=$?
105+
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=$?
106106
exit $EXIT_STATE
107107
;;
108108

109109
make-baselines-b64)
110110
SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | sed 's/\.json$//1' | circleci tests split)
111-
sudo python3 test/image/make_baseline.py b64 $SUITE || EXIT_STATE=$?
111+
uv run test/image/make_baseline.py b64 $SUITE || EXIT_STATE=$?
112112
exit $EXIT_STATE
113113
;;
114114

115115
make-baselines)
116116
SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | sed 's/\.json$//1' | circleci tests split)
117-
sudo python3 test/image/make_baseline.py $SUITE || EXIT_STATE=$?
117+
uv run test/image/make_baseline.py $SUITE || EXIT_STATE=$?
118118
exit $EXIT_STATE
119119
;;
120120

0 commit comments

Comments
 (0)