-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (37 loc) · 1.07 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
.PHONY: help check clean-pyc clean-test clean conda-export lint mypy setup test
.DEFAULT: help
help:
@echo 'make check'
@echo ' Run full suite of unit/type/lint checks'
@echo 'make clean'
@echo ' Clean up cache and coverage artifacts'
@echo 'make conda-export'
@echo ' Update conda YAML based on env'
@echo 'make lint'
@echo ' Lint code with pylint'
@echo 'make mypy'
@echo ' Check types with mypy'
@echo 'make setup'
@echo ' Create conda env based on environment YAML'
@echo 'make test'
@echo ' Run pytest unit tests'
check: test lint mypy
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
clean-test:
rm -f .coverage
rm -f .coverage.*
clean: clean-pyc clean-test
conda-export:
conda env export | grep -v "^prefix: " > environment.yml
lint:
pylint src -j 4 --reports=y
mypy:
mypy src
setup:
conda env create -f environment.yml
test: clean
python3 -m pytest -v --cov=src --cov-report=term-missing