vdiffr 1.0.8

vdiffr 1.0.7

vdiffr 1.0.6

vdiffr 1.0.5

vdiffr 1.0.4

vdiffr 1.0.3

vdiffr 1.0.2

vdiffr 1.0.0

This release includes two major changes:

  1. The internal SVG engine has been updated. It is now lighter, more robust, with fewer dependencies. It also generates more correct SVG. The main user visible change is that points look smaller than with older snapshots. Because of this update you will have to regenerate all existing snapshots with the new engine.

  2. The snapshot management system now uses testthat (see https://testthat.r-lib.org/articles/snapshotting.html). Most of the R and javascript code has been removed from vdiffr as a consequence. vdiffr now serves as a reproducible SVG generation engine for testthat snapshots.

Migration of existing snapshots

There are two steps to update your snapshots to vdiffr 1.0.

  1. This step is optional. Install the github-only 0.4.0 version of vdiffr with remotes::install_github("r-lib/vdiffr@v0.4.0"). This release only contains the new SVG engine. Review the snapshot changes as usual with vdiffr::manage_cases().

  2. Install vdiffr 1.0.0 from CRAN, delete the tests/figs directory, run devtools::test(), and then testthat::snapshot_review().

Other changes

vdiffr 0.4.0

This is a github-only release that is meant to help you migrate from vdiffr 0.3.x to vdiffr 1.0.0. The 1.0 release of vdiffr includes two major changes. It switches to testthat 3e for snapshot management and it uses an updated SVG engine for the generation of snapshots. The github-only 0.4.0 release only includes the new SVG engine to make it easy to compare cases with manage_cases().

This intermediate step in the migration of snapshots is optional. You can also choose to update directly with the 1.0.0 release but you won’t be able to compare the new snapshots to your old ones.

Note that smaller points are expected in the new snapshots because of a bugfix.

vdiffr 0.3.3

vdiffr 0.3.2

vdiffr 0.3.1

This release makes vdiffr compatible with ggplot2 3.2.0. It also features two contributions from the Tidyverse developer day in Austin:

Finally, it fixes warnings in non-UTF-8 MBCS locale (#59, @yutannihilation).

vdiffr 0.3.0

This release of vdiffr features a major overhaul of the internals to make the package more robust.

Cross-platform reliability

vdiffr now works reliably across platforms:

While this makes vdiffr much more robust, it also means you will have to regenerate all your testcases with the new version of vdiffr. You can expect very few future releases that will require updating figures, hopefully once every few years.

Now that vdiffr has a stable engine, the next release will focus on improving the Shiny UI.

Regression testing versus Unit testing

Another important change is that figure mismatches are no longer reported as failures, except when the tests are run locally, on Travis, Appveyor, or any environment where the Sys.getenv("CI") or Sys.getenv("NOT_CRAN") variables are set. Because vdiffr is more of a monitoring than a unit testing tool, it shouldn’t cause R CMD check failures on the CRAN machines.

Despite our efforts to make vdiffr robust and reliable across platforms, checking the appearance of a figure is still inherently fragile. It is similar to testing for errors by matching exact error messages: these messages are susceptible to change at any time. Similarly, the appearance of plots depends on a lot of upstream code, such as the way margins and spacing are computed. vdiffr uses a special ggplot2 theme that should change very rarely, but there are just too many upstream factors that could cause breakages. For this reason, figure mismatches are not necessarily representative of actual failures.

Visual testing is not an alternative to writing unit tests for the internal data transformations performed during the creation of your figure. It is more of a monitoring tool that allows you to quickly check how the appearance of your figures changes over time, and to manually assess whether changes reflect actual problems in your package.

If you need to override the default vdiffr behaviour on CRAN (not recommended) or Travis (for example to run the tests in a particular builds but not others), set the VDIFFR_RUN_TESTS environment variable to “true” or “false”.

Features

Life cycle

vdiffr 0.2.3

vdiffr 0.2.2

vdiffr 0.2.1

This release fixes some CRAN failures.

vdiffr 0.2.0

This release makes it easier to debug failures on remote systems. It also makes vdiffr more robust to failures caused by incompatible installations: instead of failing, the tests are skipped. This prevents spurious failures on CRAN.

Troubleshooting on remotes

Handling of incompatible systems

The tests are now skipped if the FreeType version used to build the comparison SVGs does not match the version installed on the system where the tests are run. This is necessary because changes in new version of FreeType might affect the computation of text extents, which then causes svglite to produce slightly different SVGs. The minor version is not taken into account so FreeType 2.7.1 is deemed compatible with 2.7.2 but not with 2.8.0.

In practice, this means that package contributors should only validate visual cases if their FreeType version matches the one of the package maintainer. Also, the maintainer must update the version recorded in the package repository (in the file ./tests/figs/deps.txt) when FreeType has been updated on their system. Running vdiffr::validate_cases() updates the dependency file even if there are no visual case to update.

In the future, we may provide a version of vdiffr statically compiled with a specific version of FreeType to prevent these issues.

Other changes

vdiffr 0.1.1

vdiffr 0.1.0

vdiffr 0.0.0.9000

Initial release