Repository navigation
docs: the chart images load by absolute URL so PyPI renders them - #475
Merged
Merged
Conversation
pyproject publishes README.md as the PyPI description, and PyPI does not resolve a relative path against the GitHub repo — the five charts render as broken images on the project page (verified on 0.2.14). Every chart now loads from raw.githubusercontent.com; the ten other images in the file already did. PyPI's sanitizer drops <source>, so only the <img> fallbacks matter there; the srcset URLs change too, to keep GitHub's dark variants spelled the same way.
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.
pyproject.tomlpublishesREADME.mdas the PyPI description, and PyPI does not resolve a relative path against the GitHub repo. The five charts referenceassets/*.pngrelatively, so they render as broken images on the project page — verified against the live 0.2.14 description, which carries all ten relative references.Every chart now loads from
raw.githubusercontent.com. The ten other images in the file were already absolute, so this makes the last five consistent rather than adding an exception.Two things worth knowing:
<source>entirely (verified withreadme_renderer, the library PyPI itself uses), so only the<img>fallbacks decide what shows there — PyPI gets the light chart either way, and dark mode is not recoverable through link changes. ThesrcsetURLs change too, so GitHub's dark variants stay spelled the same way as their light siblings.mainbranch, so the charts trackmain: replacing an image later also changes it on already-published PyPI pages. Pinning a tag would avoid that at the cost of an edit every release.Verification: all ten URLs return 200; rendering the new README through
readme_rendererleaves zero relative<img src>(was five); the file is byte-identical tomainapart from those ten addresses, and the<picture>/<source>/<img>counts are unchanged, so GitHub rendering is untouched.Supersedes #444, which did this before the query-cost chart was added and was closed with a note about indexing behaviour that does not apply to a README image change.