Skip to content

Latest commit

 

History

History
80 lines (53 loc) · 1.42 KB

CONTRIBUTING.md

File metadata and controls

80 lines (53 loc) · 1.42 KB

Contributing

Installation

System dependencies:

Installation:

  1. Create a new Python virtual environment.
  2. Run poetry install to install the package locally.

Tests

Running the tests:

pytest

Running the tests with code coverage:

pytest --cov=google_pay_token_decryption tests/

Linting

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

Type-checking

We use MyPy for static type-checking. You can run it with:

mypy google_pay_token_decryption tests

Releasing a new version

  1. Update CHANGELOG.md following the Keep a changelog format.

  2. Bump the version number (following semantic versioning):

bump2version < either: major / minor / patch >
  1. Push the changes up to the master branch (including the tags):
git push --tags origin HEAD:master
  1. Build the package using Poetry:
poetry build
  1. Publish the package to PyPI using Poetry:
poetry publish