From 282c0466d8507e8287cadfe9c0d6775569fb68bc Mon Sep 17 00:00:00 2001 From: mm Date: Thu, 4 May 2023 19:05:33 +0000 Subject: [PATCH] add check for git status --- Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8f5e786..c19b0dc 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,20 @@ -city_distances.csv: lint generate_data.py +city_distances.csv: check generate_data.py bash -c 'time python generate_data.py' +train: check train.py + bash -c 'time python train.py' + +eval: check eval.py + bash -c 'time python eval.py' + lint: isort --profile=black . black . flake8 --max-line-length=88 . -train: lint train.py - bash -c 'time python train.py' - -eval: lint eval.py - bash -c 'time python eval.py' +check: lint + @echo "Checking for unstaged or untracked changes..." + @git diff-index --quiet HEAD -- || { echo "Unstaged or untracked changes detected!"; exit 1; } clean: rm -rf output/