-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile
More file actions
94 lines (76 loc) · 2.23 KB
/
Makefile
File metadata and controls
94 lines (76 loc) · 2.23 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
82
83
84
85
86
87
88
89
90
91
92
93
94
.PHONY: help install dev test lint format clean build docs requirements-freeze requirements-check
# Default target
help:
@echo "Available commands:"
@echo " install Install package and dependencies"
@echo " dev Install development dependencies"
@echo " requirements-freeze Generate complete requirements.txt"
@echo " requirements-check Verify dependencies integrity"
@echo " requirements-quick-check Quick requirements validation"
@echo " test Run tests"
@echo " lint Run linting"
@echo " format Format code"
@echo " clean Clean build artifacts"
@echo " build Build package"
@echo " docs Build documentation"
# Generate complete requirements.txt with all dependencies
requirements-freeze:
uv pip compile --all-extras pyproject.toml -o requirements.txt
# Verify dependencies integrity
requirements-check:
uv pip check
@python scripts/validate_requirements.py
# Quick requirements validation
requirements-quick-check:
@scripts/quick_validate.bat
# Install package from requirements.txt
install:
pip install -r requirements.txt
# Install package in development mode
install-dev:
pip install -e ".[dev,docs]"
pre-commit install
# Install development dependencies (alias for backward compatibility)
dev: install-dev
# Run tests
test:
pytest tests/ -v --cov=midscene --cov-report=html --cov-report=term-missing
# Run tests with specific markers
test-unit:
pytest tests/ -v -m "unit"
test-integration:
pytest tests/ -v -m "integration"
# Linting
lint:
ruff check midscene/ tests/
mypy midscene/
# Format code
format:
black midscene/ tests/ examples/
isort midscene/ tests/ examples/
ruff check --fix midscene/ tests/
# Clean build artifacts
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__ -delete
find . -type f -name "*.pyc" -delete
# Build package
build: clean
python -m build
# Build documentation
docs:
mkdocs build
# Serve documentation locally
docs-serve:
mkdocs serve
# Release to PyPI
release: build
twine upload dist/*
# Release to Test PyPI
release-test: build
twine upload --repository testpypi dist/*