New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Screenshotter: Add --diff and --attempts options. #736
Conversation
@gagern ? |
Sorry, forgot to comment. I like the general idea. I'm a bit confused by the fact that you are using a different As The line where you ignore errors from mkdir might be worth a comment. I assume that this is mainly in order to deal with EEXIST, relying on the fact that any other error creating the directory should lead to a write error later on. Correct? I have a very slight dislike for the temporary file you write then delete. ImageMagick should be able to read that image from standard input. But adjusting the whole machinery so that it can feed input to the executed file makes things considerably more complicated and less generic, so I doubt that's actually worth changing. |
Oh, and we probably should make sure the directory for the diffs is included in |
Good!
The texcmp invocation does not work for my imagemagick. (Version: ImageMagick 7.0.6-0 Q16 x86_64 2017-06-12 http://www.imagemagick.org)
This is not a feature that's required to build or use katex so I do not want to do a ton of unnecessary hardening…
Will comment.
Agree.
Sorry, yes, |
8e6290d
to
1bc1dc8
Compare
Changed to |
1bc1dc8
to
3d614cf
Compare
@gagern any more comments? I have not changed texcmp imagemagick invocation but could do so later. |
Is this supposed to eventually replaced I see that |
texcmp and screenshotter.sh --diff have different purposes. Texcmp compares with tex output, screenshotter compares a new KaTeX-generated image with an older one. |
Oh, I see! That makes sense. But I didn't guess from the initial description the option help string. Perhaps change "produce image diffs" with "produce image diffs against existing screenshots" or similar? |
????? was |
It's clear now. |
Hmm... not sure why travis didn't run tests on b3aa1b4. |
@kohler can you push a commit with a trivial change? Hopefully that'll be enough to make travis run the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
--diff produces a texcmp-like diff in test/screenshotter/diff.
b3aa1b4
to
1d7a5c3
Compare
There's something weird going on with Travis. I rebased; here's a direct link to the successful Travis build, though that's not appearing here. My repo: https://travis-ci.org/kohler/KaTeX/builds/250744199 |
Good enough for me. |
@kohler thanks for the PR. Hopefully this is a one off situation with travis. |
--diff produces a texcmp-like diff in test/screenshotter/diffs.