Comments (9)
I'm not sure that's something I can do much about besides having different default thresholds for gm and looks-same or even setting default threshold to 0. In my current project we use gm and tolerance of 0.01
. We started out with 0 but think there was some edge cases where it would then detect changes where there weren't any.
from loki.
This is an issue with gm
not working properly I believe. The images are definitely different, but gm
somehow does not pick up on that (or the code in loki does not catch the error and swallows it, I haven't looked into it yet) But I saw this issue as well when I first tried out gm
and decided to stick with looks-same
until this is fixed. I certainly like the output of gm
better from the docs, so I'll probably poke at it as well to see if I can find the issue.
from loki.
There was a recent change in how loki handles gm
errors: #62 maybe that's a regression
from loki.
For me, the issue was that the default tolerance just was not triggering an issue. It appears that the change was simply not big enough to trigger the tolerance failure.
I introduced a change that for me should have broken VRT with GM but it did not (but looks-alike did)
Current
Reference
This resulted in failures in looks-alike
but for gm
it only registered an {equality: 0.0009348162}
difference where the threshold is 0.023
.
from loki.
I feel like a threshold of 0
is a better default to avoid that case like the one I posted above where technically by percentage it is within threshold but clearly is a breaking change that would have been missed.
from loki.
Having a lower threshold helped a lot. Thanks.
But there is still the point of approving and having images changed where the diff didn't raise an error.
I think a quick and easy solution would be, on loki approve
not to copy over all images from current
, but just the ones with matching names to the ones in 'difference' (which are all images where an error was raised).
This would be the expected behaviour for this command (at least from my point of view)
from loki.
@jacksbox this is an interesting problem. With threshold > 0
you are basically saying that you approve of a shifting baseline within a certain threshold, so images that differ but below the threshold are considered "approved" and I think continue to move along and be updated as the new baseline. Maybe this is a configurable item. I personally (for the scope of the projects I work on) would expect a threshold of 0 (no unexpected changes) because our storybooks are testing static expectations, and we are testing on a consistent platform (chrome.docker). I would personally get way to nervous about > 0
threshold for my usecases because that is just a % of pixels changed
check which for a larger image and smaller change (like adding a line of text in the above example) did not trigger a failure.
Should we always raise differences (even below threshold) but just mark them as differences within threshold or above) the only non-difference being a pixel perfect representation? It seems like this might bridge the gap, but require either a report that can convey that nuance in expectation where just files on a disk (we could do (threshold_differences/
and differences/
or something to store these changes on disk, but that seems clunky). I like the idea of never swallowing threshold differences, because people would probably still want to glance at > 0
changes to confirm they are expected and that their threshold is correct vs just silently swallowing them now.
from loki.
Should we always raise differences (even below threshold) but just mark them as differences within threshold or above)
I think that would be a good idea so one gets not suddenly modified files in git commits.
About the threshold of 0
- yes, having a threshold = 0
makes more sense, especially given, that looks-same
and gm
have a totally different behaviour concerning the threshold
@nowells @oblador
Regarding the last paragraph: I think the different behaviour of gm
and looks-same
should be mentioned and explained somewhere in the docs.
from loki.
I'm closing this for now with the default tolerance set to 0. Reopen or file a new issue if you think this is not enough.
from loki.
Related Issues (20)
- Failed to render with error "(0 , import_upath.normalize) is not a function"
- CI launch, problems with static files load HOT 2
- Blank stories result in "Timeout after 10000ms" HOT 2
- chrome.docker ECONNREFUSED HOT 1
- Conflict peer-dependencies of latest Storybook 7 @7.0.21 when install latest [email protected] HOT 12
- Fail to fetch stories in chrome.app: storybook v7, loki 0.32 HOT 1
- Problem with Continuous Integration - Error: ENOENT: no such file or directory, open '/root/.aws/config'
- How can I run loki test against a specific file? HOT 5
- Failed to load locales or server is down HOT 1
- How to view test screenshots results in github actions HOT 2
- Storybook fonts still failing to load from within Docker as of version 0.32 HOT 3
- Failed to load stories in chrome.docker, loki version 0.32.0 HOT 5
- chrome.docker: Fetching stories stuck
- Unable to resolve "hoist-non-react-statics" on RN
- Docker container doesn't stop
- Loki is not supporting node 14 but lambda only runs on node 14. HOT 4
- @loki/target-chrome-app has an undeclared dependency on @loki/core [0.33.0]
- A new command line argument so you can provide the path to the loki config file
- Update wait-on to the latest version to fix CVE-2023-45857 vulnerability
- Command failed with exit code 125 HOT 3
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 loki.