-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
40 lines (32 loc) · 944 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
COMPETITION = "titanic"
FILE = "gender_submission.csv"
MESSAGE = "Submittion of Kaggle Titanic!"
ifeq ($(OS),Windows_NT)
MKDIR := powershell -Command "if (!(Test-Path './data/$(COMPETITION)')) { New-Item -ItemType Directory -Path './data/$(COMPETITION)' }"
RM := del /q
UNZIP := powershell -Command "Expand-Archive -Path"
DEST := -DestinationPath
else
MKDIR := mkdir -p ./data/$(COMPETITION)
RM := rm -f
UNZIP := unzip
DEST := -d
endif
install:
poetry install --no-root
test:
poetry run pytest ./tests -vv
update:
poetry update
format:
poetry run ruff format .
poetry run ruff check . --fix
check:
poetry run ruff format --check .
kaggle-download:
kaggle competitions download -c $(COMPETITION)
$(MKDIR)
$(UNZIP) $(COMPETITION).zip $(DEST) ./data/$(COMPETITION)
$(RM) $(COMPETITION).zip
kaggle-submit:
kaggle competitions submit -c $(COMPETITION) -f ./data/$(COMPETITION)/$(FILE) -m $(MESSAGE)