-
Notifications
You must be signed in to change notification settings - Fork 854
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (44 loc) · 1.4 KB
/
Makefile
File metadata and controls
56 lines (44 loc) · 1.4 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
51
52
53
54
55
56
# Makefile for TensorBoardX
.PHONY: help init test coverage lint format clean docs
PROTO_SRC = $(wildcard tensorboardX/proto/*.proto)
PROTO_OBJ = $(PROTO_SRC:.proto=_pb2.py)
# Default target
help:
@echo "TensorBoardX Development Tasks:"
@echo " init Setup development environment (venv and dependencies)"
@echo " compile Regenerate protobuf files (only if changed)"
@echo " test Run all tests"
@echo " coverage Run tests and show coverage report"
@echo " lint Run ruff linter"
@echo " format Run ruff formatter"
@echo " docs Build documentation"
@echo " clean Remove build artifacts and temporary files"
# Environment Setup
init:
uv venv --python 3.13
uv pip install -e ".[dev]"
uv pip install "setuptools==81.0.0"
@echo "Environment initialized. Run 'source .venv/bin/activate' to use it."
# Protobuf Compilation (Dependency-aware)
compile: $(PROTO_OBJ)
%_pb2.py: %.proto
./compile.sh
# Testing
test:
uv run pytest
coverage:
uv run pytest --cov=tensorboardX --cov-report=term-missing
# Quality Control
lint:
uv run ruff check tensorboardX/
format:
uv run ruff format tensorboardX/ tests/
# Documentation
docs:
$(MAKE) -C docs html
# Cleanup
clean:
rm -rf build/ dist/ *.egg-info/ .pytest_cache/ .coverage coverage.xml
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
rm -f debug_output.gif debug_video.py