System dependencies:
- Python 3.8+
- Python Poetry
Installation:
- Create a new Python virtual environment.
- Run
poetry install
to install the package locally.
Running the tests:
pytest
Running the tests with code coverage:
pytest --cov=google_pay_token_decryption tests/
With pre-commit:
- Install pre-commit.
- Run
pre-commit install
. - Stage files.
- When you create a commit, pre-commit will automatically lint and check your staged files.
- Stage the files that were modified again.
- Repeat until no more pre-commit errors are raised.
Manually:
black .
flake8
We use MyPy for static type-checking. You can run it with:
mypy google_pay_token_decryption tests
-
Update CHANGELOG.md following the Keep a changelog format.
-
Bump the version number (following semantic versioning):
bump2version < either: major / minor / patch >
- Push the changes up to the
master
branch (including the tags):
git push --tags origin HEAD:master
- Build the package using Poetry:
poetry build
- Publish the package to PyPI using Poetry:
poetry publish