jezdez / caniusepython3.com

A site to check if your Python project is compatible with Python 3
https://caniusepython3.com/
136 stars 18 forks source link

Support badges listing the number of blocking projects #1

Closed brettcannon closed 10 years ago

brettcannon commented 10 years ago

Something like http://img.shields.io/badge/Python3%20port%20blocked%20by-3%20projects-red.svg and http://img.shields.io/badge/Python3%20port%20blocked%20by-no%20one-brightgreen.svg

jezdez commented 10 years ago

Oh man, that's an awesome idea! That implies we have to periodically check if a project has changed? Basically we could offer the badges but only schedule updating the count for them periodically when the images are requested.

brettcannon commented 10 years ago

Yes, although I was thinking even simpler before you launched your site: GET request for the badge would include a comma-separated list of direct dependencies which you can check for compatibility on the request and then do the proper HTTP forward to shields.io so the count is only direct dependencies. That way you can do a shallow check of direct dependencies being ported instead of a deep check of indirect dependencies. And I was going to cache data hourly in memcache to offload resource costs since even hourly is more frequent than most projects update (I would say a day but I assume projects would like intra-day notification of changes rather than inter-day).

jezdez commented 10 years ago

This is now kinda supported: https://jezdez.com/2014/05/14/big-updates-for-caniusepython3com/