-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathMakefile
51 lines (40 loc) · 1.02 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
50
51
.PHONY: install-poetry
install-poetry:
@curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
.PHONY: install-deps
install-deps:
@poetry install --all-extras -vv
.PHONY: fmt
fmt:
@poetry run isort .
@poetry run black .
.PHONY: clean
clean:
@find . -name "*.pyc" -delete
@find . -name "__pycache__" -delete
@rm -rf build dist .coverage MANIFEST
.PHONY: check-release
check-release:
@pip install --upgrade twine
@poetry build
@twine check dist/*
@rm -rf build dist .coverage MANIFEST
.PHONY: test
test:
@poetry run pytest -m "not webtest" -vv --cov-report term-missing --cov-report=xml --cov pornhub_api tests
.PHONY: lint-flake8
flake8:
@poetry run flake8 pornhub_api examples tests
.PHONY: lint-isort
isort:
@poetry run isort -rc --diff pornhub_api
.PHONY: lint-mypy
lint-mypy:
@poetry run mypy pornhub_api examples
.PHONY: lint-black
lint-black:
@poetry run black --diff --check .
.PHONY: lint
lint: lint-isort lint-flake8 lint-black lint-mypy
.PHONY: check
check: lint test