-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
56 lines (45 loc) · 961 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.DEFAULT_GOAL := all
code_folder = GSSP_utils
isort = isort $(code_folder)
black = black $(code_folder)
# install:
# pip install -e .
# .PHONY: install-dev-requirements
# install-dev-requirements:
# pip install -r tests/requirements.txt
# pip install -r tests/requirements-linting.txt
.PHONY: format
format:
$(isort)
$(black)
.PHONY: lint-python
lint-python:
ruff $(code_folder)
$(isort) --check-only --df
$(black) --check --diff
.PHONY: lint
lint: lint-python
.PHONY: mypy
mypy:
mypy $(code_folder)
.PHONY: all
all: lint mypy
.PHONY: clean
clean:
rm -rf `find . -name __pycache__`
rm -f `find . -type f -name '*.py[co]' `
rm -f `find . -type f -name '*~' `
rm -f `find . -type f -name '.*~' `
rm -f `find . -type f -name '*.cpython-*' `
rm -rf dist
rm -rf build
rm -rf target
rm -rf .cache
rm -rf .pytest_cache
rm -rf .mypy_cache
rm -rf htmlcov
rm -rf *.egg-info
rm -rf .ruff*
rm -f .coverage
rm -f .coverage.*
rm -rf build