-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (37 loc) · 1 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
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help
.PHONY: all
all: ## Setup, lint and test.
@echo "Running setup..."
@$(MAKE) setup
@echo "Running lint..."
@$(MAKE) lint
@echo "Running test..."
@$(MAKE) test
.PHONY: setup
setup: ## Setup project
@echo "Setting up project..."
@echo "Creating virtual environment..."
rm -rf venv
python3 -m venv venv
source venv/bin/activate
@echo "Installing requirements..."
pip install -r requirements-dev.txt
@echo "Installing project..."
pip install -e .
.PHONY: test
test: ## Run tests
@echo "Running tests with coverage..."
coverage run -m pytest tests -s -vvvv
coverage html
.PHONY: lint
lint: ## Repo linting
flake8 --docstring-convention numpy vulnerability_ra_status
mypy vulnerability_ra_status