Pybuilder plugin for anybadge badge generator
Project description
pybuilder-anybadge
A pybuilder plugin that generates badges for your project using anybadge
, for more information refer to the anybadge pypi page.
To add this plugin into your pybuilder project, add the following line near the top of your build.py:
use_plugin('pypi:pybuilder_anybadge')
NOTE if you are using Pybuilder version v0.11.x
, then specify the following version of the plugin:
use_plugin('pypi:pybuilder_anybadge', '~=0.1.0')
Pybuilder anybadge properties
The pybuilder task pyb anybadge
will use anybadge to generate badges for your project by processing reports produced from various plugins; the badges that are currently supported are:
- complexity - requires the pybuilder_radon plugin. Will depict cyclomatic complexity score for the most complicated function found in your project.
- severity - requires the pybuilder_bandit plugin. Will depict security vulnerabilities discovered by severity.
- coverage - requires the
coverage
plugin. Will depict unit test overall coverage.
The plugin will write the respective badges to the docs/images
folder. The following plugin properties are available to further configure badge generation.
Name | Type | Default Value | Description |
---|---|---|---|
anybadge_exclude | str | '' | Comma delimited string of badges to exclude from processing, valid values are 'complexity', 'severity' and 'coverage' |
anybadge_add_to_readme | bool | False | Specify if plugin should add badges to the README.md file (see below for example). Note the plugin will add the badge references but you must commit/push the changes (including svg files in the docs/images folder). |
The plugin properties are set using project.set_property
, the following is an example of how to set the properties:
project.set_property('anybadge_exclude', 'severity,coverage')
project.set_property('anybadge_add_to_readme', True)
The following badges were generated for this project using the pybuilder_anybadge
plugin:
Development
Clone the repository and ensure the latest version of Docker is installed on your development server.
Build the Docker image:
docker image build \
-t \
pybanybadge:latest .
Run the Docker container:
docker container run \
--rm \
-it \
-v $PWD:/pybuilder-anybadge \
pybanybadge:latest \
/bin/sh
Execute the build:
pyb -X
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pybuilder_anybadge-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e4b02e6a31f02e476d04f649aa6387c3ea076a2052c1c16359bd6b903f4a5aa |
|
MD5 | fa088b081561a3787033176e13a26854 |
|
BLAKE2b-256 | bfed4986e54288e096876043420592b8da466df260d80275abae953abe93476f |