Skip to main content

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

Metadata

Release files for bonus-click 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bonus-click 0.5.1
File Size Uploaded
bonus_click-0.5.1.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bonus-click 0.5.1
File Interpreter ABI Platform
bonus_click-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.7 kB

Release files / bonus_click-0.5.1.tar.gz

Download URL bonus_click-0.5.1.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6280e2a92160e1dff4f28169a9287b2e922927ecb88a84e5fc9f5b558c5dddd5
BLAKE2b-256 checksum
How to use checksums
60001ab2bbd933d8e0bb29c47039374ab99bed9cc8c7e4af91e913041316a418
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release files / bonus_click-0.5.1-py3-none-any.whl

Download URL bonus_click-0.5.1-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3baa9bb54692a81f4f57ece5b4a2e34a261664feccdd1eacde7ed20197370461
BLAKE2b-256 checksum
How to use checksums
da67f81436a9e94324e01410fd575b547ab1aec27f74b12eba00487a52495fa8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page