forked from TheFerry10/TagesschauScraper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile_
36 lines (28 loc) · 820 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
32
33
34
35
36
PYTHON = python3.9
ENV_NAME=.venv
SHELL := /bin/bash
DIRS = DailyTrigger ScrapeData scripts utils tests
.PHONY: clean
clean:
find . -name "*.swp" -o -name "__pycache__" -o -name ".mypy_cache" | xargs rm -fr
rm -fr $(ENV_NAME)
.PHONY: setup
setup:
$(PYTHON) -m venv $(ENV_NAME)
$(ENV_NAME)/bin/python -m pip install --upgrade pip
$(ENV_NAME)/bin/python -m pip install -r requirements.txt
.PHONY: test
test:
$(ENV_NAME)/bin/python -m doctest tests/*.py
$(ENV_NAME)/bin/python -m pytest tests/*.py
.PHONY: typehint
typehint:
$(ENV_NAME)/bin/python -m mypy $(DIRS)
.PHONY: format
format:
$(ENV_NAME)/bin/python -m black --line-length=79 --preview $(DIRS)
.PHONY: lint
lint:
$(ENV_NAME)/bin/python -m flake8 $(DIRS) --ignore=E501 --max-line-length=79
.PHONY: checklist
checklist: typehint format lint test