From 8490549e214e2985b405e138afd4d45bdc665d61 Mon Sep 17 00:00:00 2001 From: Sean Breckenridge Date: Wed, 25 Sep 2024 20:52:40 -0700 Subject: [PATCH] sync basic pre commit script I run --- scripts/pre-commit | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 scripts/pre-commit diff --git a/scripts/pre-commit b/scripts/pre-commit new file mode 100755 index 0000000..0dde67f --- /dev/null +++ b/scripts/pre-commit @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -e + +pip install . + +export TAKEOUT_LOGS=5 + +mypy ./google_takeout_parser ./tests/ +flake8 ./google_takeout_parser ./tests/ +pytest +if [[ -d ~/.cache/gt/Takeout-New/ ]]; then + google_takeout_parser parse --action summary --no-cache ~/.cache/gt/Takeout-New +else + echo 'No Takeout data found in ~/.cache/gt/Takeout-New' >&2 +fi