-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (36 loc) · 1.34 KB
/
Makefile
File metadata and controls
45 lines (36 loc) · 1.34 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
# Define all phony targets
.PHONY: help format lint dev-lint tests unit-tests all-tests
# Default git root path
GIT_ROOT ?= $(shell git rev-parse --show-toplevel)
# Default target, shows help
help:
@echo "Available commands:"
@echo " format - Format code using black and isort"
@echo " dev-lint - Run all linters in fix mode (for development)"
@echo " lint - Run all linters in check mode (for CI)"
@echo " integration-tests - Run all integration tests"
@echo " unit-tests - Run all unit tests"
@echo " all-tests - Run all tests"
# Code formatting and linting
format:
poetry run black .
poetry run isort .
dev-lint: format
poetry run mypy . || true
poetry run ruff check . --fix || true
# poetry pylint alphaswarm/. --max-line-length 120 --disable=R,C,I --fail-under=9
lint:
poetry run black . --check
poetry run isort . --check-only
poetry run mypy .
poetry run ruff check .
# poetry pylint alphaswarm/. --max-line-length 120 --disable=R,C,I,E0401,W1203,W0107 --fail-under=9
# Testing
integration-tests:
poetry run pytest tests/integration
unit-tests:
poetry run pytest tests/unit
all-tests: unit-tests integration-tests
ci-all-tests:
poetry run pytest tests/unit tests/integration --cov=alphaswarm --cov-report=html:reports/coverage \
--html=reports/pytest-report.html --self-contained-html