Commit Graph

104 Commits

Author SHA1 Message Date
Jon Grace-Cox
c5fc1a6c61 Merge pull request #20 from jongracecox/10-fix-mutltiple-badge-width-issue
Use different SVG mask ids for each generated badge
v1.4.0
2019-06-01 23:52:10 -04:00
Jon Grace-Cox
3d24ecba0f Use different SVG mask ids for each generated badge
Within a single Python session anybadge will use different SVG mask IDs.
This is an attempt to fix the issue where SVG files displayed in the same
HTML will re-use the same mask, and therefore appear with the same dimensions.

Uses a singleton on the class to maintain a sequence of mask ids.

Includes unittests to ensure new ID is used for each badge.
2019-06-01 23:49:13 -04:00
Jon Grace-Cox
a4b20c60d1 Merge pull request #19 from jongracecox/add-repr-and-str-dunders
Add repr and str dunder functions
v1.3.0
2019-06-01 23:18:33 -04:00
Jon Grace-Cox
4bdb6dcdab Add repr and str dunder functions
* Add __repr__ function that prints the object representation.
* Add __str__ function that prints the Badge SVG text.

Also:
* Add constructor args to the Badge class docstring.
* Change the way defaults are used in the Badge constuctor.  Instead of
  setting values, use None and set arguments to the default values inside
  the constructor.
* Fix unittests that don't use overwrite=True.
2019-06-01 23:15:13 -04:00
Jon Grace-Cox
b88eb5fc07 Merge pull request #18 from Steap/license-classifiers
Use classifiers to specify the license.
2019-06-01 10:34:53 -04:00
Cyril Roelandt
3450712ec6 Use classifiers to specify the license.
Classifiers are a standard way of specifying a license, and make it easy
for automated tools to properly detect the license of the package.

The "license" field should only be used if the license has no
corresponding Trove classifier.
2019-06-01 16:08:44 +02:00
Jon Grace-Cox
750205a595 Merge pull request #17 from jongracecox/add-pypi-package-badge-to-readme
Add pypi package badge to README.md
2019-06-01 04:36:10 -04:00
Jon Grace-Cox
281c7871d6 Add pypi package badge to README.md 2019-06-01 04:35:10 -04:00
Jon Grace-Cox
aa4977bcf8 Merge pull request #16 from jongracecox/14-fix-extra-padding-around-long-value-text
14 fix extra padding around long value text
v1.2.0 v1.2.0rc9
2019-06-01 04:07:05 -04:00
Jon Grace-Cox
28c58d060d Ensure that modified version is retained during deployment 2019-06-01 04:03:11 -04:00
Jon Grace-Cox
8e4d0d88f0 Ignore test badge files anywhere 2019-06-01 04:02:31 -04:00
Jon Grace-Cox
29dee657f9 Merge pull request #15 from jongracecox/14-fix-extra-padding-around-long-value-text
14 fix extra padding around long value text
v1.2.0rc8 v1.2.0rc1
2019-06-01 03:42:36 -04:00
Jon Grace-Cox
71fb2551f6 Comment out _get_character_percentage_dict function 2019-06-01 03:38:41 -04:00
Jon Grace-Cox
9f58cf07e4 Switch to xenial distribution for TravisCI
This is required in order to use Python3.
https://docs.travis-ci.com/user/languages/python/#python-37-and-higher
2019-06-01 03:38:41 -04:00
Jon Grace-Cox
c22485752f Use git tag for pypi package version
* Stop using Mr Bump for version handling.
* Only deploy to pypi on tags (not master branch).
* Pick up version number from Travis CI TRAVIS_TAG environment variable.
2019-06-01 03:38:41 -04:00
Jon Grace-Cox
5405e1920c Update README.md with latest changes 2019-06-01 03:38:41 -04:00
Jon Grace-Cox
13eca9ebfd Run doctests and unittests as part of automated testing
* Switch default version to Python 3.7.
* Add 3.7 to the supported versions list.
* Remove redundant test.py.

This test module was basic and is being replaced by doctests and unittests.
2019-06-01 03:38:41 -04:00
Jon Grace-Cox
1f2e030735 Add pytest and pytest-cov to build requirements 2019-06-01 03:38:41 -04:00
Jon Grace-Cox
cc8dd5ac96 Add threshold and text color unittests 2019-06-01 03:38:41 -04:00
Jon Grace-Cox
1532cc247e Add more accurate width calculations for truetype fonts
* Use a better estimation technique to guess text widths.
* Add unittests for validating badge widths for various size badges.
* Add return types to function docstrings.
* Update relevant doctests.
2019-06-01 03:38:34 -04:00
Jon Grace-Cox
59976b5c25 Update ignored files
* .pytest_cache directory
* badge files generated by unittests
* htmlcov directory
2019-06-01 02:34:07 -04:00
Jon Grace-Cox
1850a95806 Fix green color, and default badge color. release-1.1.1 2018-03-26 07:44:51 -04:00
Jon Grace-Cox
debb72385a Added ability to set server logging level via env var. Added Dockerfile for running server. 2018-02-21 00:25:39 -05:00
Jon Grace-Cox
45f3a68a66 Added first implementation of anybadge HTTP server. 2018-02-18 23:03:27 -05:00
Jon Grace-Cox
2905d4a022 Switch to renderable SVG links in README. 2018-02-10 11:43:08 -05:00
Jon Grace-Cox
8eccc69ec6 Added pygments to build requirements. 2018-02-10 11:31:16 -05:00
Jon Grace-Cox
6d9863262c Added reStructuredText syntax check to setup.py and updated README. 2018-02-10 11:27:40 -05:00
Jon Grace-Cox
259437b4b1 Removed setup.cfg, as it may be causing documentation to be incrrectly rendered in PyPi. 2018-02-10 11:01:48 -05:00
Jon Grace-Cox
b1ff0c468a Add PyPi link to README. release-1.1.0 2018-02-10 10:48:03 -05:00
Jon Grace-Cox
352f11f27f Convert remainder of README to markdown. 2018-02-10 10:46:05 -05:00
Jon Grace-Cox
397add0179 Added extra examples to README. 2018-02-10 10:31:01 -05:00
Jon Grace-Cox
4ea5f31139 Added .DS_Store to .gitignore. 2018-02-10 10:30:45 -05:00
Jon Grace-Cox
bf68dd7b92 Include examples in README. Switch to markdown README. 2018-02-10 10:21:31 -05:00
Jon Grace-Cox
f0d204d743 Switch to using mister-bump for version bumping. release-1.0.0 2018-02-09 21:42:38 -05:00
Jon Grace-Cox
2925295a0a Add ability to choose text color (#6) v0.1.0.dev2 2017-09-27 21:34:29 -04:00
Jon Grace-Cox
43b42bc2d8 Removed brightgreen color (#7) 2017-09-27 20:39:41 -04:00
Jon Grace-Cox
07dc07989e Added .idea to .gitignore. 2017-09-27 20:14:10 -04:00
jongracecox
6de925dd17 Updated README.rst 2017-09-16 16:27:33 -04:00
Jon Grace-Cox
74ab9802b2 Replaced README and README.md with README.rst. (#5) 2017-09-12 19:44:23 -04:00
Jon Grace-Cox
311dee665d Added changelog and extended README.md. (#4) 2017-09-12 19:44:15 -04:00
Jon Grace-Cox
a5ff11669d README.md 2017-09-11 21:47:01 -04:00
Jon Grace-Cox
fe45ac8e2a Changed version number. v0.1.0.dev1 2017-09-11 21:25:25 -04:00
Jon Grace-Cox
3b22ee92e3 Added readme for inclusion in PyPi. 2017-09-11 21:24:54 -04:00
Jon Grace-Cox
4fc7d5071e Added command line registration (#2) 2017-09-11 21:23:47 -04:00
Jon Grace-Cox
dedb789c0c Added link to travis from build badge in README. v0.1.0.dev0 2017-09-11 21:05:02 -04:00
Jon Grace-Cox
96258f9ac4 Added PyPi deployment to travis.yml. 2017-09-11 21:02:48 -04:00
Jon Grace-Cox
68700eb657 Added build badge to readme. 2017-09-11 18:23:58 -04:00
Jon Grace-Cox
3f7a8f3c17 Added basic travis CI file. 2017-09-11 18:17:12 -04:00
Jon Grace-Cox
67c3fb8b44 Added authors file. 2017-09-11 18:13:40 -04:00
Jon Grace-Cox
bb17cd6a81 Added basic execution test. 2017-09-11 18:13:40 -04:00