File tree Expand file tree Collapse file tree 2 files changed +34
-9
lines changed Expand file tree Collapse file tree 2 files changed +34
-9
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
+ # install required fonts
2
3
sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji && \
3
4
sudo python3 .circleci/download_google_fonts.py && \
4
5
sudo cp -r .circleci/fonts/ /usr/share/ && \
5
6
sudo fc-cache -f && \
7
+ # install kaleido & plotly
6
8
sudo python3 -m pip install kaleido==0.2.1 plotly==5.1.0 --progress-bar off
Original file line number Diff line number Diff line change @@ -207,17 +207,40 @@ npm run test-jasmine -- --help
207
207
npm run test-jasmine -- --info
208
208
```
209
209
210
- ### Draft new baseline
211
- Install fonts and tools
210
+ ### Draft new baselines
211
+ #### With docker:
212
+ > If you prefer using docker each time you need to
213
+ ``` sh
214
+ docker run -it -v " $( pwd) " :/plotly.js circleci/python:3.8.9 bash
215
+ # then inside the docker
216
+ cd plotly.js
217
+ sudo bash .circleci/env_image.sh
218
+ ```
219
+
220
+ #### Without docker:
221
+ > Otherwise you may need to install ` python 3.8 `
222
+ Then upgrade ` pip ` if needed
212
223
``` sh
213
- # install required fonts (if missing) on ubuntu
214
- sudo cp -r .circleci/fonts/ /usr/share/ && sudo fc-cache -f
215
- # upgrade pip (if needed)
216
224
python3 -m pip install --upgrade pip
217
- # install kaleido
218
- python3 -m pip install kaleido
219
- # install plotly
220
- python3 -m pip install plotly
225
+ ```
226
+
227
+ To install required fonts and tools see this [ shell script] ( https://github.com/plotly/plotly.js/blob/master/.circleci/env_image.sh ) .
228
+
229
+ #### Scripts to generate/update new baselines with/without docker:
230
+ ``` sh
231
+ python3 test/image/make_baseline.py = mock_1 mock_2
232
+ ```
233
+
234
+ > Alternatively using npm & node.js (which are not available in the python docker by default)
235
+
236
+ ``` sh
237
+ npm run baseline mock_1 mock_2
238
+ ```
239
+
240
+ Or
241
+
242
+ ``` sh
243
+ npm run baseline mock_*
221
244
```
222
245
223
246
** IMPORTANT:** the ` baseline ` , ` test-image ` and ` test-export ` scripts do ** not** bundle the source files before
You can’t perform that action at this time.
0 commit comments