Surface image errors and warnings from HTML rendering in verifyproblem - #486
Merged
Merged
Conversation
…L rendering in verifyproblem
Contributor
|
I tested it on ~10 problems from PO where we have illustrations. No auto-generated illustrations triggered the warning, but real photos frequently triggered the uppercase warning. I think this is fine, since I have yet to see a problem where all that resolution is actually used. Perhaps this could've saved us from the 20k x 20k picture here 🙂 https://open.kattis.com/problems/investigatingfrogbehaviouronlilypadpatterns |
Contributor
Author
|
Great, thanks for testing! The uppercase warning has in some sense always been there (if one manually ran problem2html). I take it from your comment, that it's probably the right call to surface it in verifyproblem (I'm 99% sure the reason we hid it had more to do with earlier implementation limitations, rather than a choice) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Starts threading in Diagnostics into PlasTeX rendering to be able to better flag errors and warnings during tex -> html rendering. Also adds a check when converting pdf images to png, catching
gsexiting with 0 without producing any png file.After this PR, if rendering tex->html causes warnings/errors, those will be spotted by verifyproblem (and not just the generic failure message telling you to run problem2html to diagnose, even if that can still happen). This means that having large images is now a warning directly in verifyproblem, and failing to convert images is an error. I think this is a clear step up, but happy to hear feedback on if this ends up too spammy for some problems.
As a bonus, errors/warnings we ourselves emit in problem2html for tex->html are now colorful, like in verifyproblem.
This PR also deprecates
--quietin problem2html. That switch now only controls 2 print statements (use--log-levelinstead to control how much output you want). For obvious reasons,--quietwill not print a deprecation warning. :)Fixes #470