File size: 584 Bytes
4c42be0
f0751eb
4c42be0
 
 
 
 
 
 
 
 
 
 
 
2704487
4c42be0
 
 
 
 
d92ff2e
4c42be0
21e3f0a
4c42be0
f0751eb
 
4c42be0
f0751eb
 
4c42be0
29898af
 
4c42be0
 
 
 
 
 
 
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
SHELL := /bin/bash

VENV := .venv

ifeq ($(OS),Windows_NT)
	VENV_BIN := $(VENV)/Scripts
	PYTHON := $(VENV_BIN)/python.exe
	RM := del /s /q
else
	VENV_BIN := $(VENV)/bin
	PYTHON := $(VENV_BIN)/python
	RM := rm -rf
endif

.PHONY: venv install lint test format run clean

venv:
	uv venv $(VENV)

install: venv
	uv sync --python $(PYTHON)

lint: 
	$(VENV_BIN)/pylint --disable=R,C app.py chatlib

test:
	PYTHONPATH=. $(VENV_BIN)/pytest -vv

format:
	$(VENV_BIN)/black app.py chatlib

run:
	$(PYTHON) app.py

clean:
	$(RM) $(VENV)
	$(RM) .pytest_cache
	$(RM) __pycache__
	$(RM) .mypy_cache