-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (27 loc) · 980 Bytes
/
Copy pathMakefile
File metadata and controls
35 lines (27 loc) · 980 Bytes
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
#* Variables
SHELL := /usr/bin/env bash
PYTHON := python
#* Directories with source code
CODE = monitoring_as_code tests
CODE_FMT = monitoring_as_code tests demo
#* 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 install -n
.PHONY: mypy
mypy:
poetry run mypy --install-types --non-interactive --config-file pyproject.toml ./
.PHONY: format
format:
poetry run pyupgrade --exit-zero-even-if-changed --py310-plus **/*.py
poetry run autoflake --recursive --in-place --remove-all-unused-imports --ignore-init-module-imports $(CODE_FMT)
poetry run isort --settings-path pyproject.toml $(CODE_FMT)
poetry run black --config pyproject.toml $(CODE_FMT)