Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
81 lines (65 loc) · 1.77 KB
/
Copy pathMakefile
File metadata and controls
81 lines (65 loc) · 1.77 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# PawVision Development Makefile
.PHONY: help install install-dev test test-unit test-integration lint format clean build
# Default target
help:
@echo "PawVision Development Commands:"
@echo ""
@echo " install Install production dependencies"
@echo " install-dev Install development dependencies"
@echo " test Run all tests"
@echo " test-unit Run unit tests only"
@echo " test-integration Run integration tests only"
@echo " test-cov Run tests with coverage report"
@echo " lint Run linting (flake8, mypy, bandit)"
@echo " format Format code (black, isort)"
@echo " clean Clean build artifacts"
@echo " build Build package"
@echo " pre-commit Install pre-commit hooks"
@echo ""
# Installation
install:
pip install -r requirements.txt
install-dev:
pip install -r requirements-dev.txt
# Testing
test:
pytest tests/ -v
test-unit:
pytest tests/ -v -m "not integration"
test-integration:
pytest tests/ -v -m integration
test-cov:
pytest tests/ -v --cov=pawvision --cov-report=html --cov-report=term-missing
# Code quality
lint:
flake8 pawvision/ tests/
mypy pawvision/ --ignore-missing-imports
bandit -r pawvision/ -c pyproject.toml
format:
black pawvision/ tests/
isort pawvision/ tests/
# Security
security:
bandit -r pawvision/ -c pyproject.toml
safety check
# Build and packaging
clean:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info/
rm -rf .pytest_cache/
rm -rf .coverage
rm -rf htmlcov/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
build: clean
python -m build
# Development setup
pre-commit:
pre-commit install
# Development server
dev:
python main.py
# Check everything before commit
check: format lint test
@echo "All checks passed! ✅"