forked from pydantic/FastUI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (37 loc) · 998 Bytes
/
Makefile
File metadata and controls
46 lines (37 loc) · 998 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
36
37
38
39
40
41
42
43
44
45
46
.DEFAULT_GOAL:=all
path = src/python-fastui
.PHONY: install
install:
pip install -U pip pre-commit pip-tools
pip install -r $(path)/requirements/all.txt
pip install -e $(path)
pre-commit install
.PHONY: update-lockfiles
update-lockfiles:
@echo "Updating requirements files using pip-compile"
pip-compile -q --strip-extras -o $(path)/requirements/lint.txt $(path)/requirements/lint.in
pip-compile -q --strip-extras -o $(path)/requirements/test.txt $(path)/requirements/test.in
pip-compile -q --strip-extras -o $(path)/requirements/pyproject.txt $(path)/pyproject.toml --extra=fastapi
pip install --dry-run -r $(path)/requirements/all.txt
.PHONY: format
format:
ruff check --fix-only $(path)
ruff format $(path)
.PHONY: lint
lint:
ruff check $(path)
ruff format --check $(path)
.PHONY: typecheck
typecheck:
pyright
.PHONY: test
test:
coverage run -m pytest
.PHONY: testcov
testcov: test
coverage html
.PHONY: dev
dev:
uvicorn demo:app --reload
.PHONY: all
all: testcov lint