Skip to content

[Legacy PR #24] Support for displaying a trend line and embedding a right image (by @rahul-deepsource)#20

Open
ashrobertsdragon wants to merge 7 commits into
masterfrom
legacy-pr-24
Open

[Legacy PR #24] Support for displaying a trend line and embedding a right image (by @rahul-deepsource)#20
ashrobertsdragon wants to merge 7 commits into
masterfrom
legacy-pr-24

Conversation

@ashrobertsdragon
Copy link
Copy Markdown

Original Author: @rahul-deepsource
Original PR: google#24


Thanks for the wonderful library!

I wanted to add the functionality to add a trend line which can graphically show how a metric has been varying over time, and thought that this would be a nice addition to this library as well!

Here are a bunch of changes:

  • Add show-trend argument which takes in comma-separated list of values (maximum: 10).
  • Add --right-image which would display an image (110 x 14) between left and right text.
  • Rename --left-color to --bg-color because this was also the background for the right_image, so it didn't really make sense to call it left-color.
  • Add a new left-color which would add a

Here is an example:

which was generated using the command:

python -m pybadges --left-text "badge trends" --right-text "2.1k" --whole-link "https://deepsource.io/gh/deepsourcelabs/asgard" --bg-color "#252525" --right-color "#63B439" --logo https://raw.githubusercontent.com/deepsourcelabs/brand-assets/master/logo-white.svg --show-trend 1311,2100,3333,598,800,1111,200 --left-color="#4E4E4E" --embed-logo

There are still a few tests failing (and docs missing). If you give me a green flag that you intend to merge these changes, I'd be happy to provide them as well! :)

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