forked from LuckLittleBoy/SenseVoice-OneApi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (20 loc) · 825 Bytes
/
Makefile
File metadata and controls
25 lines (20 loc) · 825 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
init:
ifeq ($(OS),Windows_NT)
@where uv > NUL 2> NUL || pip install uv -i https://mirrors.aliyun.com/pypi/simple
set "UV_HTTP_TIMEOUT=300" && uv sync $(if $(VIRTUAL_ENV),--active,) --frozen --all-extras --no-install-project
else
@which uv > /dev/null 2>&1 || pip install uv -i https://mirrors.aliyun.com/pypi/simple
export UV_HTTP_TIMEOUT=300 && uv sync $(if $(VIRTUAL_ENV),--active,) --frozen --all-extras --no-install-project
endif
run:
uv run $(if $(VIRTUAL_ENV),--active,) python -m src.main
build:
uv build
fmt:
@uv run $(if $(VIRTUAL_ENV),--active,) black ./src ./tests
@uv run $(if $(VIRTUAL_ENV),--active,) isort --profile black ./src ./tests
@$(MAKE) lint
lint:
@uv run $(if $(VIRTUAL_ENV),--active,) pflake8 ./src ./tests
coverage: lint
@uv run $(if $(VIRTUAL_ENV),--active,) pytest --cov=src tests