Attempt to fix the package version bug by fetching the entire repo
in the package build workflow. This should get the tag so it can be
used when setting the version.
Closes#106.
Update the `inv --test.local` command to ensure that tests are run against
the correct version of the package. The invoke command has been updated to:
- Ensure the `anybadge` command is not available on the system to start with
- Ensure `pip` is available
- Pip install the local project
- Run tests
- Pip uninstall `anybadge`
The net result is that invoke will be more robust in terms of making sure the
installed version is in sync when running CLI tests.
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.
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.
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.
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.
* 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
* 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`
- 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)
- 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.
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