-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (33 loc) · 939 Bytes
/
Makefile
File metadata and controls
41 lines (33 loc) · 939 Bytes
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
# Define variables
LINTER = flake8
TEST_DIR = ./tests
PROFILE_SCRIPT = ./tests/performance.py
# Default target
all: install format lint test profile
# Install dependencies
install:
pip install -r requirements.txt
# Format code
format:
black .
# Lint code
lint:
$(LINTER) --max-line-length=88 --ignore=E203,E501 .
# Run tests
test:
coverage run -m unittest discover -s $(TEST_DIR)
coverage report -m
# Run profiling
profile:
PYTHONPATH=./ python $(PROFILE_SCRIPT)
# Help command to display available commands (optional)
help:
@echo "Available commands:"
@echo " all - Install dependencies, format, lint, test and profile"
@echo " install - Install Python dependencies"
@echo " format - Format Python code"
@echo " lint - Lint Python code"
@echo " test - Run tests"
@echo " profile - Run profiling script"
@echo " help - Display this help message"
.PHONY: all install format lint test profile help