Skip to main content

Install make based hooks with ease.

Project description

A simple git hooks installer. Inspired by husky.

I liked simplicity of setting up git hooks using husky and since I failed to find a similar tool in python ecosystem, I decided to write one myself.

As far as I know there is no standard equivalent to npm scripts in python, so I chose to rely on make which seems to be a popular way to organise project related tasks in python world.

Install

Whippet is available as a pypi package. Use a tool that can install packages from it, like for instance pip.

$ pip install requests

Usage

Once whippet is installed, it is used by invoking whippet executable in the directory where you wish to install hooks. Whippet will check if that directory (or its ancestor) contains a .git directory and offer to install hooks into it.

$ cd demo
$ whippet
whippet - Are you sure you want to install hooks in /home/bpp/demo/.git? [Y/n] y

Whippet hooks are scripts that check for existence of make targets with the same name as git hooks. If such a target exists, script will execute it. Let’s take pre-commit as an example. Once whippet hooks are installed, we simply add pre-commit target to the Makefile like so:

pre-commit:
    @echo "Hello from whippet"

Then o

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

whippet-0.2.3.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

whippet-0.2.3-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file whippet-0.2.3.tar.gz.

File metadata

  • Download URL: whippet-0.2.3.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.6.8 Linux/4.15.0-60-generic

File hashes

Hashes for whippet-0.2.3.tar.gz
Algorithm Hash digest
SHA256 6dafd7c08a6cb882fc557b2c547f4b704eb2c9920aa3f23f02410fc45de76451
MD5 880a877125bd041c3b0b66220b896229
BLAKE2b-256 871a642eede0c0aba7818e417cf1d2bb141f78218b173a9f764ec436f5ce42e7

See more details on using hashes here.

File details

Details for the file whippet-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: whippet-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.6.8 Linux/4.15.0-60-generic

File hashes

Hashes for whippet-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d5adaa745ae7ee923935394c92efa5bd9c3cae636c321699b9e9fb5656cf5104
MD5 c5a33f01da254f9439cf7c16999a9d28
BLAKE2b-256 066592c184ecb4122a98b5d2cabfc53e539f646788d4131c90e982f31230cd75

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