Skip to main content

PIICatcher Developer Setup

Download PIICatcher from Github or fork

git clone https://github.com/tokern/piicatcher.git

Install Poetry

Follow instructions on Poetry website

Setup virtualenv

cd piicatcher
poetry shell
poetry install
piicatcher --help

Setup pre-commit hooks (required if you plan to contribute code)

Pre-commit hooks run the following checks:

  • black
  • mypy
  • flake8
  • isort
pre-commit install -t pre-commit

Setup databases in docker for tests

Install docker and docker-compose.

docker-compose -f test/docker-compose.yml up -d

Check if the container are running:

docker ps

CONTAINER ID IMAGE ... CREATED STATUS PORTS NAMES
8b1798a9307d postgres:13 ... 6 days ago Up 6 days 0.0.0.0:5432->5432/tcp postgres
09775e0d564f ghcr.io/linuxserver/mariadb ... 2 months ago Up 6 days 0.0.0.0:3306->3306/tcp mariadb

Run unit tests

pytest

# Run tests in a specific file
pytest tests/test_cli.py