Fix label and value escaping by defaulting to html escaping them.
Provide Python and CLI args to allow reverting to old behavior of
not escaping.
Fixes#91
Add `tox.ini` config with supported versions, and a new tox CI
workflow to run tox tests on master branch changes. This is "expensive"
so we may consider limiting execution further.
This commit allows badges to be generated with only a label or only
a value.
Badges must provide at least a label or a value, so it is not valid
to create a badge with no label and no value. This will result in
a `ValueError` being raised.
- Drop support for Python <3.7
- Bump the pre-commit version used in CI
- Add type hinting and docstrings
- Add mypy to pre-commit config
- Fix typing issues
- Update colors module
- Update colors module to use uppercase hex codes
- Add `__lt__` to allow sorting colors by name
- Fix `build_examples.py` to work with color Enum
- Update example badges in `README.md`
- Fix typing issues in server
- Update travis links in `README.md`
- Fix PyPi deployment bug (#60)
Python version support
======================
- Drop Python 2.7 support
- Add testing for Python 3.4 and 3.9
- Set python version requirements in setup.py
Package changes
===============
- Split module up into a package with submodules
- Break templates out into package resources
- Incorporate server into same package
- Use Enum for colors
- Refresh example badges
- Simplify documentation - Remove cli options and python api
documentation from the README as it is hard to maintain, and
often goes out-of-date
- Add CONTRIBUTING.md
Allow value and thresholds to be interpreted as semantic version numbers
by passing --semver (cli) or semver=True (python).
Add docs, unittests, import error handling, cli updates, requirements updates.
* Set default padding chars to 0.5.
* Split num_padding_chars into num_label_padding_chars and num_value_padding_chars
to allow better control. Retain num_padding_chars as an input parameter, but
internally it is dropped.
* Remove padding multipliers.
* Add measurements image for developers. Helps show what each of the internal
measurements are.
* Add script to build example badges.
* Update example badges.
Reliability
=======
* Raise a value error if an invalid font is passed.
* Handle labels that are not passed as str.
* Raise a value error if an invalid color name is passed.
Testing
=======
* Expand doctests to increase test coverage.
* Add Arial size 11 font and extra font sizes (mainly for testing).
* Make parse_args and main more testable by taking args as an input parameter.
* Use useful badge text in unittest badges.
* Add template svg file for testing.
* Add HTML coverage generation to travis yaml.