-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (32 loc) · 914 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
# Makefile
# OS specific commands and variables
ifeq ($(OS),Windows_NT)
SET_ENV = set
else
SET_ENV = export
endif
# List of directories and files to format and lint
TARGETS = agentml/
# Format code using isort and black
format:
poetry run isort $(TARGETS)
poetry run black $(TARGETS)
# Lint code using ruff
lint:
poetry run ruff $(TARGETS)
# Setup project for development
setup:
poetry run pre-commit install --config .config/.pre-commit.yaml
poetry run pre-commit autoupdate --config .config/.pre-commit.yaml
# Run FastAPI server
run:
poetry run uvicorn main:app --reload
# Display help message by default
.DEFAULT_GOAL := help
help:
@echo "Available commands:"
@echo " make format - Format code using isort and black"
@echo " make lint - Lint code using ruff"
@echo " make check - Format and lint code"
# Declare the targets as phony
.PHONY: format lint check help