Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (35 loc) · 1.52 KB
/
Copy pathMakefile
File metadata and controls
47 lines (35 loc) · 1.52 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
.PHONY: test test-full tri-system-smoke check compile clean lint format all help
PYTHON ?= python
CORE_TEST_ARGS ?= tests --ignore=tests/test_tri_system_smoke.py
TRI_SYSTEM_SMOKE_ARGS ?= tests/test_tri_system_smoke.py
help:
@echo "make test - run the core OpenWAM test suite"
@echo "make test-full - run the full OpenWAM test suite"
@echo "make tri-system-smoke - run tri-system smoke tests"
@echo "make lint - check code with ruff"
@echo "make format - auto-format code with ruff"
@echo "make compile - syntax-check Python sources with compileall"
@echo "make check - run compile checks and the core test suite"
@echo "make all - lint + core test"
@echo "make clean - remove Python cache files"
@$(MAKE) --no-print-directory docker-help
test:
$(PYTHON) -m pytest -q -m "not gpu" $(CORE_TEST_ARGS)
test-full:
$(PYTHON) -m pytest -q tests
tri-system-smoke:
$(PYTHON) -m pytest -q $(TRI_SYSTEM_SMOKE_ARGS)
lint:
$(PYTHON) -m ruff check openwam/ benchmarks/ scripts/ tests/ docker/
format:
$(PYTHON) -m ruff format openwam/ benchmarks/ scripts/ tests/ docker/
$(PYTHON) -m ruff check --fix openwam/ benchmarks/ scripts/ tests/ docker/
compile:
$(PYTHON) -m compileall openwam benchmarks scripts tests docker
check: compile test
all: lint test
clean:
find . -name "__pycache__" -type d -prune -exec rm -rf {} +
find . -name "*.pyc" -delete
# Keep the default target and native recipes here; Docker commands live together.
include docker/docker.mk