You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+6-8Lines changed: 6 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -12,24 +12,22 @@ If your pull request fixes a bug and/or implements a new feature, please [write
12
12
13
13
### Running visual tests via docker
14
14
15
-
The **plotly** package ships with a [Dockerfile](https://github.com/ropensci/plotly/blob/master/Dockerfile) for running visual tests in a consistent and reproducible environment. You can build and run the docker container like so:
15
+
To ensure a consistent and reproducible environment, visual tests should be run against the [cpsievert/plotly-orca](https://hub.docker.com/r/cpsievert/plotly-orca/) docker image. If you add a new visual test and/or expect any differences, run a container like so:
16
16
17
17
```shell
18
18
git clone https://github.com/ropensci/plotly.git
19
19
cd plotly
20
-
docker build -t plotly-vdiffr .
21
-
docker run --privileged -p 3838:3838 plotly-orca
20
+
docker run -v $(pwd):/home/plotly --privileged -p 3838:3838 cpsievert/plotly-orca
22
21
```
23
22
24
-
This will launch a shiny app for inspecting and validating any visual differences. To see the shiny app, open your browser to <http://0.0.0.0/3838>. If there are differences that look 'good', you should validate them, then copy the new "baseline" figures over to your host machine (so that you can git add/commit/push the new baselines).
23
+
This will launch a shiny app for inspecting and validating any visual differences. To see the shiny app, open your browser to <http://0.0.0.0/3838>. If there are differences that look 'good', you should validate them via the shiny app. This will automatically copy over the new "baseline" figures over to your host machine (so that you can git add/commit/push the new baselines).
24
+
25
+
If, for some reason, you want to just run the visual tests to see if they'll pass, do:
25
26
26
27
```shell
27
-
# assuming the most recent container you've run has the new baselines
28
-
docker cp $(docker ps -aq | head -n 1):/home/plotly/tests/figs ./tests
28
+
docker run -e VMODE="ci" -v $(pwd):/home/plotly cpsievert/plotly-orca
29
29
```
30
30
31
-
Say your changes produce changes in the corresponding svg of existing tests and/or you want to do write new tests (hooray!). In that case, you'll want to run `vdiffr::manage_cases()`, which should eventually launch a shiny app of "mismatched" and "new" to visually inspect before approving the changes.
32
-
33
31
## Code of Conduct
34
32
35
33
We want to encourage a warm, welcoming, and safe environment for contributing to this project. See the [code of conduct](https://github.com/ropensci/plotly/blob/master/CONDUCT.md) for more information.
0 commit comments