Skip to content

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

Merged
merged 4 commits into from
Jul 17, 2024

Conversation

DanielYang59
Copy link
Collaborator

Summary

  • Fix ptable scatter examples in homepage

I'm sure @janosh fixed this before but for some reason it's now broken again

@DanielYang59 DanielYang59 added the docs Improvements or additions to documentation label Jul 17, 2024
Copy link
Owner

@janosh janosh left a 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!

@janosh janosh enabled auto-merge (squash) July 17, 2024 13:47
@janosh janosh merged commit 97deef2 into janosh:main Jul 17, 2024
8 checks passed
@DanielYang59 DanielYang59 deleted the fix-ptable-in-homepage branch July 18, 2024 02:21
@DanielYang59
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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.

Copy link
Owner

@janosh janosh Jul 18, 2024

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

Copy link
Collaborator Author

@DanielYang59 DanielYang59 Jul 18, 2024

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 🤣

Copy link
Owner

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).

Copy link
Owner

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

Copy link
Collaborator Author

@DanielYang59 DanielYang59 Jul 19, 2024

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.

Copy link
Owner

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

Copy link
Collaborator Author

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 :)

janosh added a commit that referenced this pull request Mar 28, 2025
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants