forked from lightkurve/lightkurve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (27 loc) · 813 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
.PHONY: all clean pytest coverage flake8 black mypy isort
CMD:=poetry run
PYMODULE:=src
TESTS:=tests
# Run all the checks which do not change files
all: mypy pytest flake8
# Run the unit tests using `pytest`
pytest:
$(CMD) pytest $(PYMODULE) $(TESTS)
# Generate a unit test coverage report using `pytest-cov`
coverage:
$(CMD) pytest --cov=$(PYMODULE) $(TESTS) --cov-report html
# Lint the code using `flake8`
flake8:
$(CMD) flake8 $(PYMODULE) $(TESTS)
# Automatically format the code using `black`
black:
$(CMD) black $(PYMODULE) $(TESTS)
# Perform static type checking using `mypy`
mypy:
$(CMD) mypy $(PYMODULE) $(TESTS)
# Order the imports using `isort`
isort:
$(CMD) isort $(PYMODULE) $(TESTS)
# Generate a setup.py file from pyproject.toml
setup.py: pyproject.toml
$(CMD) dephell deps convert