Commit Graph

117 Commits

Author SHA1 Message Date
Jon Grace-Cox
67af6673fc fix: Fix pypi publish authentication v1.15.6 2024-12-30 11:06:17 -05:00
Jon Grace-Cox
ba4ef2f8c1 fix: Download dist before deploying to pypi v1.15.5 2024-12-30 11:00:51 -05:00
Jon Grace-Cox
44d6c67fb1 fix: Fix Python release workflow v1.15.4 2024-12-30 10:50:25 -05:00
Jon Grace-Cox
93e9816fde fix: Fix gh-action-pypi-publish action version v1.15.3 2024-12-30 10:22:15 -05:00
Jon Grace-Cox
87e8f3bde0 fix: Fix release workflow v1.15.2 2024-12-30 10:13:15 -05:00
Jon Grace-Cox
03a91dd6a5 test: Limit tox execution
Only run tox when code changes.
v1.15.1
2024-12-30 10:03:56 -05:00
Jon Grace-Cox
16c7eab136 fix: Fix tox workflow python versions
Remove 3.7 from python version list due to bug in action:

https://github.com/actions/setup-python/issues/962
2024-12-30 10:03:56 -05:00
Jon Grace-Cox
bfdc87b313 fix: Fix package release workflow 2024-12-30 10:03:56 -05:00
Jon Grace-Cox
ba0b8a333d chore: Use git tag for package version
Update `setup.py` to use git tag for package version.
v1.15.0
2024-12-30 09:08:43 -05:00
Jon Grace-Cox
d053fb613a chore: Replace email with protected email 2024-12-30 09:08:43 -05:00
Jon Grace-Cox
267939bcea chore: Switch release workflow to github
Switch from using TravisCI to GitHub for the Python package release workflow.
2024-12-30 09:08:43 -05:00
Jon Grace-Cox
e6318f3446 test: Add tox testing
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.
2024-12-30 08:29:56 -05:00
Jon Grace-Cox
43a4bea37c fix: Fix pre-commit on master branch
Ignore no-commit-to-branch check when running in CI workflow, since this check
is only relevant to running locally, and fails when running on master branch in
CI workflow.
2024-12-30 07:57:26 -05:00
Jon Grace-Cox
cda1c4ddfa test: Run PR checks on master push
Run PR checks on pushes to master in addition to master branch PRs. This
allows the check to be used in a master branch ruleset.
2024-12-30 07:50:44 -05:00
Jon Grace-Cox
9d660b5652 refactor: Refactor PR checks into single workflow
Refactor the pre-commit and python test workflows into a single workflow
in order to use pre-commit check as a gate for Python tests. This will help
limit execution of Python tests.
2024-12-30 07:50:44 -05:00
Jon Grace-Cox
96d102f307 test: Run cli checks in PR workflow
Simplify execution of CLI tests and run them in the CI workflow after
Python tests.
2024-12-30 07:30:11 -05:00
Jon Grace-Cox
bb9ef961fb chore: Add github workflows
Add github workflows for running pre-commit hooks on all files and
running pytests.
2024-12-30 07:16:00 -05:00
Jon Grace-Cox
9d4470a1a0 Allow badges with no value or no label (#89)
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.
2024-12-30 06:53:33 -05:00
Jon Grace-Cox
a076a4867a chore: Update pre-commit hooks
Update pre-commit hooks to latest version and apply fixes for
mypy type checking and linting.
2024-12-30 06:46:24 -05:00
Jon Grace-Cox
cc5a757663 Add 3.11 to travis ci (#85)
Switch to Ubuntu jammy release, and add 3.11 testing.
2023-03-27 10:30:29 -07:00
Jon Grace-Cox
65ee5a2578 Update pypi deploy to use token (#84) 2022-08-25 17:10:44 -04:00
Jon Grace-Cox
f4fbb70d87 Add pepy.tech total downloads badge to readme (#83) 2022-08-24 18:52:28 -04:00
Jon Grace-Cox
bc1ff41348 Fix readme and contribution guide (#82) 2022-08-24 18:44:22 -04:00
Jon Grace-Cox
ea180efc1e Add snyk health badge to readme (#81) v1.14.0 2022-08-24 18:36:59 -04:00
Jon Grace-Cox
cb40df6d11 Refactor invoke tasks (#80)
- Add `--version` to cli
- Add invoke tasks:
  - `package.build`
  - `package.install`
  - `test.cli`
- Refactor invoke task implementation
- Refactor `run_pypi_tests.sh`
- Split into separate files to support running locally
2022-08-24 17:05:55 -04:00
Jannis Mainczyk
2bd52f41cd anybadge cli accessible via python -m (#79)
* anybadge cli can be called via python -m

* fix: anybadge should be shown in cli usage string

* also allow executing anybadge.server as module

* test: same output regardless of how cli is called
2022-08-24 15:08:08 -04:00
Jon Grace-Cox
2af319bc6b Add standard color names (#76)
Closes #56
v1.13.0
2022-08-15 14:43:27 -04:00
Jon Grace-Cox
406138d08e Add example emoji svg files (#75)
* Stop ignoring `example/*.svg` files
* Add emoji example svg files
2022-08-14 13:02:41 -04:00
Jon Grace-Cox
34374dbc2b Add emoji examples to documentation (#74)
Closes #43
2022-08-14 12:33:12 -04:00
Jon Grace-Cox
ea2eccd948 Add testing for PyPi releases (#72) v1.12.0 2022-08-13 15:35:46 -04:00
Jon Grace-Cox
ff0ee0d5e0 Fix pypi deploy (#71)
Ensure deploy happens from project root directory
v1.11.2rc2
2022-08-13 14:57:10 -04:00
Jon Grace-Cox
1c986d4ad8 Add package testing to CI (#68)
* Make `build_examples.py` callable from python
* Allow tests to run from outside project directory
* Add invoke tasks
* Add server tests
* Run travis tests against wheel package instead of local code
* Update `badge.write_badge()` to support `pathlib.Path`
* Update `CONTRIBUTING.md`
v1.11.2rc1
2022-08-13 13:22:15 -04:00
Jon Grace-Cox
9b7318417d Fix broken server import (#70)
Closes #66
2022-08-13 12:12:19 -04:00
Jon Grace-Cox
b891c596d6 Allow template as pathlib.Path (#69) 2022-08-13 12:07:55 -04:00
Jon Grace-Cox
54fa6a40c2 Add Python 3.10 testing to ci (#67)
Update Travis CI config to use later Ubuntu worker
Add Python 3.10 testing
2022-08-09 19:01:52 -04:00
Jon Grace-Cox
27b25f7a26 Fix backage build missing templates submodule (#63) (#64) v1.11.1 2022-08-09 08:22:05 -04:00
Jon Grace-Cox
8a434d95b5 Drop <3.7 support and add type hints (#59)
- 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)
v1.11.0
2022-08-08 23:19:50 -04:00
Jon Grace-Cox
f16867114a Add pre-commit config and apply changes (#54)
- Add .pre-commit-config.yaml with initial config.
- Add python black pre-commit config
- Apply pre-commit code changes
- Add information to CONTRIBUTING.md
- Add pre-commit to build requirements
- Run pre-commit during travis CI build
- Use a travis build matrix to control when pre-commit runs
  in the CI process. Use explicit include to only run
  pre-commit on Python 3.9.
v1.10.0
2022-08-08 19:02:02 -04:00
Jon Grace-Cox
217555a155 Fix typo in readme (#49) (#58) 2022-08-08 18:38:04 -04:00
Jon Grace-Cox
efab2f6f79 Add missing example svg files (#53) 2022-03-10 07:34:48 -05:00
Jon Grace-Cox
b6ca345ebe Drop py27 support and refactor (#51) (#52)
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
2022-03-10 07:26:46 -05:00
Matt Calvert
6de2da8d58 Add style support and add GitLab Scoped labels (#50)
- Add new `--style` argument
- Add new **GitLab Scoped** label style
- Update documentation to reflect new argument
v1.9.0 v1.9.0rc1
2022-02-22 08:52:24 -05:00
Karthikeyan Singaravelan
17b4addc37 Use assertRaisesRegex for Python 3.11 compatibility (#48)
Use `assertRaisesRegex` instead of `assertRaisesRegexp` for Python 3.11 compatibility.
v1.8.0
2021-11-09 10:49:24 -05:00
Jon Grace-Cox
fa351616e1 Add buymeacoffee link to README.md 2021-11-04 14:45:58 -04:00
Fabian Affolter
6fbc545fad Remove unittest (#47) 2021-08-26 15:40:54 -04:00
Jon Grace-Cox
eec5a0c1bc Update issue templates 2021-05-26 09:40:07 -04:00
Jon Grace-Cox
a5ff4f0dfe Add semantic version support (#45) (#46)
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.
1.8.0rc1
2021-05-25 18:22:43 -04:00
Jon Grace-Cox
0f8dfbb695 Add label and value padding char command line options. (#40)
Also fixes command line usage with args defaulting to None on main function.
v1.7.0rc3 v1.7.0
2020-03-15 13:29:08 -04:00
Jon Grace-Cox
d38230ce3a Fix command line argument passing to main. (#39) v1.7.0rc2 2020-03-15 13:12:41 -04:00
Jon Grace-Cox
aeedfbb93d Fix padding issues (#38)
* 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.
v1.7.0rc1
2020-03-15 12:51:34 -04:00