-
Notifications
You must be signed in to change notification settings - Fork 139
/
Makefile
50 lines (35 loc) · 1.1 KB
/
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
41
42
43
44
45
46
47
48
49
50
.PHONY: init test lint pretty notebooks precommit_install bump_major bump_minor bump_patch clean
BIN = .venv/bin/
CODE = socceraction
init:
python3 -m venv .venv
poetry install
tests/datasets/statsbomb/:
$(BIN)python tests/datasets/download.py --download-statsbomb --convert-statsbomb
tests/datasets/wyscout_public/:
$(BIN)python tests/datasets/download.py --download-wyscout --convert-wyscout
tests/datasets/spadl/:
$(BIN)python tests/datasets/download.py --spadl
test: tests/datasets/statsbomb/ tests/datasets/wyscout_public/ tests/datasets/spadl/
nox -rs tests -- $(args)
mypy:
nox -rs mypy -- $(args)
lint:
nox -rs lint -- $(args)
pretty:
nox -rs pre-commit -- $(args)
notebooks:
$(BIN)python -m nbconvert --execute --inplace --config=default.json public-notebooks/*.ipynb
precommit_install:
nox -rs pre-commit -- install
bump_major:
$(BIN)bumpversion major
bump_minor:
$(BIN)bumpversion minor
bump_patch:
$(BIN)bumpversion patch
clean:
find . -type f -name "*.py[co]" -delete
find . -type d -name "__pycache__" -delete
rm -rf tests/datasets/wyscout_public
rm -rf tests/datasets/statsbomb