-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (40 loc) · 1.26 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
49
# This file is part of f4
# https://github.com/scorphus/f4
# Licensed under the BSD-3-Clause license:
# https://opensource.org/licenses/BSD-3-Clause
# Copyright (c) 2020, Pablo S. Blum de Aguiar <scorphus@gmail.com>
# list all available targets
list:
@sh -c "$(MAKE) -p no_targets__ | awk -F':' '/^[a-zA-Z0-9][^\$$#\/\\t=]*:([^=]|$$)/ {split(\$$1,A,/ /);for(i in A)print A[i]}' | grep -v '__\$$' | grep -v 'make\[1\]' | grep -v 'Makefile' | sort"
.PHONY: list
# required for list
no_targets__:
# install dependencies
setup:
@pip install -U black flake8 isort
.PHONY: setup
# run isort, black and flake8 for style guide enforcement
isort:
@isort .
.PHONY: isort
black:
@black .
.PHONY: black
flake8:
@flake8
.PHONY: flake8
lint: isort black flake8
.PHONY: lint
# fire the even fibonacci sums runner
run:
@python src/main.py
.PHONY: run
# clean python object, test and coverage files
clean:
@find . -type f -name "*.pyc" -delete -print
@find . -type f -iname '.coverage' -exec rm -rf \{\} + -print
@find . -type d -iname '.pytest_cache' -exec rm -rf \{\} + -print
@find . -type d -iname '__pycache__' -exec rm -rf \{\} + -print
@find . -type d -iname '.benchmarks' -exec rm -rf \{\} + -print
@find . -type d -iname '*.egg-info' -exec rm -rf \{\} + -print
.PHONY: clean