Closed hadley closed 4 years ago
Thanks for the notice, will look into this and how to fix.
Seems like there are two issues, (1) This package use scales::muted
to get default colors (function now gives slightly different result), which was pretty silly choice, can easily change to just use the output of the function, (2) the results of scales::col_numeric
have changed. Will need to think about how to adjust this one... right now the tests look for entire charts to be recreated exactly, which is fairly brittle. Probably good idea to rework those expectations to look for an approximately equal json-as-list representation of the chart. Wondering if there is an existing "approximately equal" for colors?
One option might be to use vdiffr? That's what we use for testing ggplot2.
Thanks for the suggestion, I think in long run switching to use vdiffr would be a good idea, but I think it would first require enabling outputting an svg (also a worthwhile feature in its own right). Will try going with a work-around (checking scales package version, and having two different versions of output) for now.
I have submitted to cran now an updated version that should work with both old & new versions of scales (using a hacky approach of looking for package version). Will close this issue once that is up on cran, and will add a new issue for better testing approach.
Thanks!
@AliciaSchep:
I have submitted to cran now an updated version...
Would you mind tagging/releasing this version on github, too? (see https://github.com/ropensci/iheatmapr/issues/44).
@mschilli87 I will tag/release once it is accepted on CRAN.
(Ran into an issue where there was a pre-existing issue with the package on the 'noLD' platform. The fix for this scales issue actually ended up helping a bit for that issue, but did not fully resolve it. Have a fix now and should submit a new release soon).
Updated version on CRAN now and made a tag/release on github.
With test failures like: