Skip to content

Make the conda and DOI README badges load on GitHub - #36

Open
ecrum19 wants to merge 1 commit into
mainfrom
fix/readme-badges
Open

ecrum19 wants to merge 1 commit into
mainfrom
fix/readme-badges

Conversation

@ecrum19

@ecrum19 ecrum19 commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Problem

The conda version and DOI badges at the top of the README showed as broken images on GitHub.

GitHub loads README images through its camo proxy, which returns a 504 after about 4 seconds.

  • DOI badge: zenodo.org/badge/DOI/...svg took 7 to 18 seconds when fetched directly. Through camo it returned a 504 at about 4.2 s on every attempt.
  • Conda badge: shields.io caches conda/vn for only 5 minutes. A cold lookup against anaconda.org took 6.6 s, so the badge broke whenever the cache had expired. It loaded fine when the cache was warm, which is why the failure was intermittent.

Fix

  • DOI badge: use a static shields.io badge, img.shields.io/badge/DOI-10.5281%2Fzenodo.23237635-blue. It shows the same text in the same colour and needs no upstream lookup. The link still goes to the concept DOI.
  • Conda badge: add ?cacheSeconds=86400 so shields.io and GitHub's CDN keep the badge for a day. The anaconda.org lookup now runs about once a day instead of every 5 minutes. The trade-off is that the version shown can lag a new release by up to a day.

Verification

I rendered both new lines through GitHub's markdown API and fetched the resulting camo URLs three times each. All six requests returned 200 image/svg+xml in under a second. The DOI badge's title reads DOI: 10.5281/zenodo.23237635.

🤖 Generated with Claude Code

GitHub serves README images through its camo proxy, which gives up after
about 4 seconds. Zenodo's DOI badge endpoint takes 7 to 18 seconds, so the
badge failed on every page load. Replace it with a static shields.io badge
that shows the same DOI and needs no upstream lookup.

The shields.io conda badge only cached for 5 minutes, and a cold lookup
against anaconda.org took over 6 seconds, so it broke intermittently.
Cache it for a day with cacheSeconds=86400.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants