-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
50 lines (42 loc) · 1.33 KB
/
makefile
File metadata and controls
50 lines (42 loc) · 1.33 KB
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
47
48
49
50
VERSION_CMD = "uv run scripts/get_version.py ./pyproject.toml"
.PHONY: lint
lint:
@echo "Linting with Ruff:"
@uv run ruff check --fix-only src tests scripts benchmarks
@uv run ruff check src tests scripts benchmarks
@echo "Type checking with Ty"
@uv run ty check src tests scripts benchmarks
@echo "Linting finished"
.PHONY: tests
tests:
@uv run coverage run
@uv run coverage report
.PHONY: build-python-package
build-python-package:
@uv lock --check
@rm -rf ./dist
@uv build
.PHONY: release-notes
release-notes: build-python-package
@uv run --no-project --script \
--with dist/wsd_torch_models-$$("${VERSION_CMD}")-py3-none-any.whl \
./scripts/release_notes.py
.PHONY: run-cu128
run-cu128:
@uv run --no-group cpu --group cu128 $(CMD)
.PHONY: add-cu128
add-cu128:
@uv add --no-sync $(CMD)
@uv sync --no-group cpu --group cu128 --all-extras
.PHONY: tests-cu128
tests-cu128:
@uv run --no-group cpu --group cu128 coverage run
@uv run --no-group cpu --group cu128 coverage report
.PHONY: lint-cu128
lint-cu128:
@echo "Linting with Ruff:"
@uv run --no-group cpu --group cu128 ruff check --fix-only src tests scripts benchmarks
@uv run --no-group cpu --group cu128 ruff check src tests scripts benchmarks
@echo "Type checking with Ty"
@uv run --no-group cpu --group cu128 ty check src tests scripts benchmarks
@echo "Linting finished"