-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (35 loc) · 1.06 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
#################################################################################
# COMMANDS #
#################################################################################
## Create/update conda environment
.PHONY: env
env:
conda env create -f conda.yaml
## precommit hooks with flak8 and black
.PHONY: precommit
precommit:
pre-commit run --all
## Format code using flake8
.PHONY: lint
lint:
flake8 src
## Format your code using black
.PHONY: black
black:
black . -v
# Run tests using pytest github actions (including integration test)
.PHONY: test
test: clean-pyc clean-test
python -m pytest
# ## Delete all compiled Python files
.PHONY: clean-pyc
clean-pyc: ## Remove Python file artifacts.
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
.PHONY: clean-test
clean-test: ## Remove test and coverage artifacts.
rm -f .coverage coverage.xml
rm -fr htmlcov/ .junit/
rm -fr .pytest_cache