-
Notifications
You must be signed in to change notification settings - Fork 25
Fix ptable scatter examples in homepage #180
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
Conversation
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.
good catch, thanks @DanielYang59!
No problem, thanks for reviewing! |
@@ -24,7 +24,7 @@ jobs: | |||
|
|||
- name: Compress SVG assets and commit to current PR | |||
run: | | |||
svgo --multipass assets | |||
svgo --multipass --final-newline assets --exclude ptable-scatters-*.svg |
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.
@janosh Wondering why do we exclude ptable scatter here? svgo
seem to work just fine on my machine.
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.
svgo
is the SVG compressor that kept repeatedly mangling those example plots you fixed in this PR. like you wrote above, i fixed them before
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.
I just looked into the history, you indeed fixed them in eb8fd62, and for some reason they got broken again in 3e89e59. Meanwhile I didn't notice svgo
to break these two plots on my machine (installed from homebrew)? Perhaps you should try to update svgo
on your side?
I'm just wondering why svgo
only break scatter plots, not others 🤣
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.
the commit that broke the assets was d218a46 which was created by the svgo.yml
CI workflow, not on my local machine. it always uses the latest svgo
(running on Linux which shouldn't matter much since SVGO uses nodejs and so should be largely platform independent).
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.
I'm just wondering why svgo only break scatter plots, not others 🤣
that i don't know. i suspect it's a bug in svgo
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.
Beautiful. Thanks for the input. I might collect this in to my TODO list and perhaps report this to the svgo
team.
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.
that would be great! could also be a bug in matplotlib
btw. perhaps matplotlib
is not following the SVG spec in some way which makes it harder for svgo
to losslessly compress. seems less likely though given the SVG renders fine before compression
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.
Okay! But I would need to figure out how to recreate this in the first place :)
* update ptable assets * prevent svgo from breaking ptable-scatters during compression * svgo pass --final-newline * add class Task to enums.py --------- Co-authored-by: Janosh Riebesell <[email protected]>
Summary
I'm sure @janosh fixed this before but for some reason it's now broken again