-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
44 lines (35 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
#* Variables
SHELL := /usr/bin/env bash
PYTHON := python
PYTHONPATH := `pwd`
#* Poetry
.PHONY: poetry-download
poetry-download:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | $(PYTHON) -
.PHONY: poetry-remove
poetry-remove:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | $(PYTHON) - --uninstall
#* Installation
.PHONY: install
install:
poetry lock -n && poetry export --without-hashes > requirements.txt
poetry install
#* Pre-commit
.PHONY: pre-commit-install
pre-commit-install:
poetry run pre-commit install
.PHONY: pre-commit
pre-commit:
poetry run pre-commit run --all-files
#* Lint
.PHONY: codestyle
codestyle:
poetry run autopep8 --in-place --aggressive --aggressive .
#* CI
.PHONY: ci
ci:
poetry run pylint --rcfile=.pylintrc --output-format=colorized --reports=n --fail-under=9.5 --jobs=0 --score=no src
#* Tests
.PHONY: tests
tests:
poetry run pytest --cov=src --cov-report=term-missing --cov-report=xml tests