Skip to content

Commit 8fa9062

Browse files
committed
build: improved Makefile
1 parent 21e3816 commit 8fa9062

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Makefile

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
.PHONY: docs
22

3+
SRCDIRS = gptme tests scripts train
4+
EXCLUDES = tests/output
5+
36
build:
47
poetry install
58

69
test:
710
@# if SLOW is not set, pass `-m "not slow"` to skip slow tests
8-
poetry run pytest tests scripts -v --cov=gptme --cov-report=term-missing --cov-report=html $(if $(SLOW),, -m "not slow") $(if $(PROFILE),--profile-svg)
11+
poetry run pytest ${SRCDIRS} -v --cov=gptme --cov-report=term-missing --cov-report=html $(if $(SLOW),, -m "not slow") $(if $(PROFILE),--profile-svg)
912

1013
typecheck:
11-
poetry run mypy --ignore-missing-imports gptme tests scripts --exclude tests/output
14+
poetry run mypy --ignore-missing-imports ${SRCDIRS} --exclude ${EXCLUDES}
1215

1316
lint:
14-
poetry run ruff gptme tests scripts
17+
poetry run ruff ${SRCDIRS}
1518

1619
format:
17-
poetry run black gptme tests
20+
poetry run black ${SRCDIRS}
1821

19-
precommit:
20-
make test
21-
make typecheck
22-
make lint
22+
precommit: format lint typecheck test
2323

2424
docs:
2525
poetry run make -C docs html

0 commit comments

Comments
 (0)