Skip to main content

Convenience wrappers around helpful click patterns.

Project description

Bonus Click - bonus_click

Convenience wrappers around helpful click patterns.

Getting Started

Install with pip:

pip install bonus-click

Developer Guide

The following is documentation for developers that would like to contribute to Bonus Click.

Python Dependencies

Poetry is required to manage Python dependencies. You can install it easily by following the operating system specific instructions here.

pyproject.toml contains dependencies for required Python modules for building, testing, and developing. They can all be installed in a virtual environment using the follow commands:

python3.10 -m venv .venv
source ./.venv/bin/activate
poetry install

There's also a bin script to do this, and will install poetry if you don't already have it:

./tools/create_venv.sh

Testing

This project uses pytest to manage and run unit tests. Unit tests located in the test directory are automatically run during the CI build. You can run them manually with:

./tools/run_tests.sh

Local Linting

There are a few linters/code checks included with this project to speed up the development process:

  • Black - An automatic code formatter, never think about python style again.
  • Isort - Automatically organizes imports in your modules.
  • Pylint - Check your code against many of the python style guide rules.
  • Mypy - Check your code to make sure it is properly typed.

You can run these tools automatically in check mode, meaning you will get an error if any of them would not pass with:

./tools/run_checks.sh

Or actually automatically apply the fixes with:

./tools/apply_linters.sh

There are also scripts in ./tools/ that include run/check for each individual tool.

Using pre-commit

Upon cloning the repo, to use pre-commit, you'll need to install the hooks with:

pre-commit install --hook-type pre-commit --hook-type pre-push

By default:

  • black
  • pylint
  • isort
  • mypy

Are all run in apply-mode and must pass in order to actually make the commit.

Also by default, pytest needs to pass before you can push.

If you'd like skip these checks you can commit with:

git commit --no-verify

If you'd like to quickly run these pre-commit checks on all files (not just the staged ones) you can run:

pre-commit run --all-files

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bonus_click-0.2.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bonus_click-0.2.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file bonus_click-0.2.1.tar.gz.

File metadata

  • Download URL: bonus_click-0.2.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for bonus_click-0.2.1.tar.gz
Algorithm Hash digest
SHA256 53b3aab3e39f1f519f4574a4fdbd3ecc1752e18c839cfc74c2a964d99b48ed7a
MD5 a563727dd9e893c3cb467aedb22c9d61
BLAKE2b-256 a2d6967f817f2dd85f6e5782f70a9dda3fe5e6f7d38a2d9050274deb24c75cad

See more details on using hashes here.

File details

Details for the file bonus_click-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: bonus_click-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for bonus_click-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c53baf2946c15e3b11a4126debaa70231b595408350c97d5ac202f40ed77ad62
MD5 2b719c129188923a06123e2e72292c8f
BLAKE2b-256 777f0b14382a472c7d9ce5f1fec26891daf1e2e93bc6f54058c264e4ea784a4d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page