-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
52 lines (41 loc) · 1011 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Note that Poetry is required, see https://python-poetry.org/docs/#installation
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
MAKEFLAGS += --no-builtin-variables
ifneq (,$(wildcard ./.env))
include .env
export
endif
.DEFAULT_GOAL := all
SHELL := bash
RUN := poetry run
.PHONY: all
all: install test clean
.PHONY: install
install:
poetry install
.PHONY: build
build:
poetry build
.PHONY: test
test:
$(RUN) pytest tests
.PHONY: docs
docs:
$(RUN) typer src/koza/main.py utils docs --name koza --output docs/Usage/CLI.md
$(RUN) mkdocs build
.PHONY: clean
clean:
rm -rf `find . -name __pycache__`
rm -f `find . -type f -name '*.py[co]' `
rm -rf .pytest_cache
rm -rf output test-output
rm -rf dist
.PHONY: lint
lint:
$(RUN) ruff check --diff --exit-zero src/ tests/ examples/
$(RUN) black --check --diff -l 120 src/ tests/ examples/
.PHONY: format
format:
$(RUN) ruff check --fix --exit-zero src/ tests/ examples/
$(RUN) black -l 120 src/ tests/ examples/