Comments (3)
In general Pkg.test should run a lot of tests in the first place to test functionality and have good coverage. In this case everything of Plots.jl should be covered/called, not necessarily the backends. Some work could be spend to generate the tests out of combinations of options.
For regression testing (i.e. taking care you get the same output) i'd say take two backends with different rendering technique which are resonably stable (Gadfly as Cairo based, UnicodePlots as different) and just do plain image (png) comparison.
from plots.jl.
Yeah I think I agree that there should be two different sets of tests. The runtests.jl
file should contain lots of Plots-only tests that test how input data is handled, that the data is sliced up correctly, that arguments flow through as expected, etc. No plots should be generated (or at most, they could be generated just to see if errors are thrown).
The second set of tests will compare actual output images, and should be started manually by someone who will examine differences between flagged images and handle appropriately (either confirm there's a regression/error, or decide that the new image is correct and replace the old reference image).
from plots.jl.
The testing framework is in place. I use @timholy 's image compare macro, and have methods to run through the examples and compare to reference images (for example, saved in test/refimg/v0.4/gadfly/ref1.png
). If there is a difference, then a new Gtk window is built, showing the new image vs the reference image, and giving the options to skip or to save this image as the new reference.
In non-interactive mode, the error is simply rethrown. I use FactCheck, and have incorporated each example as a @fact
, so that Travis will be able to perform full integration testing. (in theory!!)
There are some bugs to iron out, but does this framework sound like something that should end up in it's own package?
code: https://github.com/tbreloff/Plots.jl/blob/dev/test/imgcomp.jl
from plots.jl.
Related Issues (20)
- [BUG] Backend init broken in Julia 1.10 if loaded during precompilation HOT 2
- [BUG] Plots in VSCode shows no error when it should show
- [BUG] World age problem
- Precompile scripts leaves files behind
- [BUG] log2 axis label not rendered properly
- [FR] pythonplot: (optionally) rasterize heatmap
- [BUG] Heatmap changes image content when axis are not equally long and swapped by mistake
- Disable svg inlining in Jupyter notebooks
- [BUG] Cannot Independently Set ylims for twined (`twinx()`) axes
- [BUG] `markerstrokestyle` doesn't work
- [BUG] Too much space for yticks with plotly backend
- GR backend missing GKSTerm.app on macOS Sonoma Version 14.3 (23D56) HOT 3
- [FR] Bar plots should accept named tuples like in R HOT 6
- [FR] Ability to resize the arrow heads in e.g. quiver plots
- [BUG]: when plotting densities density(<distrib>) fails whereas plot(<distrib>) is ok
- [BUG] [PlotlyJS] Layout broken for subplot 1 when generating figure with 5 or more subplots HOT 1
- [BUG] Plots backend documentation unclear HOT 1
- [BUG] Missing Contour Labels with NaN spaces
- Cannot change the linewidth of a single plot HOT 1
- [FR] Allow plotting function data in quiver() HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plots.jl.