-
Notifications
You must be signed in to change notification settings - Fork 24
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
Generate badges for packages #216
Comments
shields.io now has piwheels version badges e.g: https://img.shields.io/piwheels/v/numpy |
This is great, thanks. What's the significance of the colours? |
Good question. For a standard shields version badge, the colours mean:
but in answering this question, I realise that is not exactly what is happening. I've used our standard version formatter but of course, this isn't quite right for pep440 as it will format something like |
This actually opened a small worm-can as I realised our other python ecosystem badges had the same problem, but this is now fixed upstream: badges/shields#7682 |
Thanks What's supposed to happen if we have failed builds for a package? e.g. pyglm shows blue but we don't have wheels for any recent versions: Currently it seems that it's just mirroring PyPI, not actually providing any piwheels-specific information (the use case here badges/shields#6506 wanted to be able to spot whether piwheels had fallen behind PyPI). Perhaps it should check for files under the latest version in the JSON response? Could be red for no files available. |
Useful example. I now see where you were going with the colours. I think the direction I would lean in would be to show the most recent version that has >=1 files on piwheels rather than use colour to indicate build status. So in the same way we exclude any yanked releases That approach would make the badge for pyglm rather than That would be more in line with our usual practice - a version badge shows the latest available (good/valid) version and colour indicates whether or not it is a pre-release. I'd probably think of "piwheels build status: passing/failing" as being a seperate build status badge like |
I agree that showing the latest version with (any) files would be most useful. Then all remains is what to do about a package we have zero files for. |
If I remove any releases with zero files as suggested above then we'd render |
Perfect! |
Cool. I'll get a PR done for that tomorrow |
Would it be difficult to show the overall or monthly downloads count? Or should I craft something from the JSON API (using shield.io entrypoint). |
For anyone that is curious about a Downloads badge, I was able to craft one for the The Although, I'm finding that the dynamic badge link tends to sometimes return a 502 error 🤷🏼♂️ |
It would be nice if we could provide dynamic badges for packages to show build status or latest version or something, giving people the chance to embed these buttons of their sites/docs/readmes, like this PyPI one:
There's a service at shields.io that allows you to provide a JSON endpoint:
We could generate the JSON in
the_scribe
along with JSON files. It would need updating at the same frequency.The text was updated successfully, but these errors were encountered: