-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (36 loc) · 872 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
.DEFAULT_GOAL := all
# Checa se o uv está instalado
.PHONY: .uv
.uv:
@uv --version || echo 'Please install uv: https://docs.astral.sh/uv/getting-started/installation/'
# Checa se o pre-commit está instalado
.PHONY: .pre-commit
.pre-commit:
@pre-commit -V || echo 'Please install pre-commit: https://pre-commit.com/'
# Instala dependências do projeto
.PHONY: install
install: .uv .pre-commit
uv sync --frozen --all-extras
uv run pre-commit install --install-hooks
# Padroniza código do projeto
.PHONY: lint
lint:
uv run ruff check . --fix
# Formata código do projeto
.PHONY: format
format:
uv run ruff format .
# Executa casos de teste
.PHONY: test
test:
uv run pytest
# Cria documentação
.PHONY: docs
docs:
uv run mkdocs build
# Serve documentação
.PHONY: docs-serve
docs-serve:
uv run mkdocs serve --no-strict
.PHONY: all
all: lint format test