-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
31 lines (23 loc) · 882 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
.PHONY: test lint fix install build
project_folder = nifi_cluster_coordinator
test_folder = test
entry_file = main.py
files = $(wildcard **/*.py)
test_files = $(wildcard **/test_*.py)
config_file = conf/nifi-cluster-coordinator.yaml
default_log_level = DEBUG
run: fix
@python3 $(project_folder)/$(entry_file) --loglevel $(default_log_level) --configfile $(config_file)
test:
@pytest -s -v $(test_files) --doctest-modules --cov $(project_folder) --cov-config=setup.cfg --cov-report term-missing
# Ignoring W292 on linting because autopep8 can't seem to fix it
lint:
@flake8 --statistics $(project_folder) $(test_folder)
fix:
@autopep8 --aggressive --in-place -r $(project_folder) $(test_folder)
dev-setup:
@pip3 install -U -r requirements.txt
build: lint clean
@docker build . -t nifi-cluster-coordinator:$(dockertag)
clean:
@find . -name '*.pyc' -exec rm --force {} +