Skip to content

Badge customization support #763

@michaelthomasletts

Description

@michaelthomasletts

Feature Description

The ability to customize the PePy badge using the features normally available from Shields, e.g. logo, color, etc.

Motivation

I could be mistaken (please tell me if I am!) but I do not see any way to customize the badge offered by PePy. Additionally, although Shields badges are customizable, those badges do not offer total downloads. Only badges with daily, weekly, and monthly downloads are available. Therefore, users wanting total downloads and customization are left to their own devices.

Presuming I am not mistaken, that lack of customization is disappointing, as I tend to decorate and customize badges on my projects according to color and style.

Proposed Solution

I created my own hacky solution.

However, it would of course be most ideal if PePy made badge customization possible!

I propose adding customization inputs which match Shields's standard customization inputs.

Shields allows users to employ custom endpoints via https://img.shields.io/endpoint. So long as total download statistics are published in an acceptable format, Shields badges will consume whatever data is available. And, as a consequence of employing https://img.shields.io/endpoint, PePy users will be able to customize badges. You may want to check the README of my hacky solution (linked above) for additional context. This would require deprecating pybadges, if I am not mistaken.

It appears to me like, on the back-end, this could be achieved by creating new (or editing existing) classes that mimic the above-mentioned features offered by Shields in the pepy.domain.model module for use elsewhere in the package.

Alternatives Considered

I am happy to continue supporting the stop-gap / hacky solution I provided above if it is most convenient for you in order to support users like myself.

Additional Context

...

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions