-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (53 loc) Β· 1.41 KB
/
Makefile
File metadata and controls
63 lines (53 loc) Β· 1.41 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
.PHONY: install dev test lint format clean build upload ci
# Install package
install:
pip install -e .
# Install development dependencies
dev:
pip install -e .[dev]
# Run tests
test:
pytest
# Run linting
lint:
flake8 replicated tests examples
mypy replicated
# Format code
format:
black replicated tests examples
isort replicated tests examples
# Clean build artifacts
clean:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
# Build package
build: clean
python -m build
# Upload to PyPI (requires twine)
upload: build
twine check dist/*
twine upload dist/*
# Run all checks (CI simulation - no formatting, just checking)
ci:
@echo "π Running all CI checks locally..."
@echo "π¦ Installing dependencies..."
@python3 -m pip install -e .[dev] > /dev/null 2>&1
@echo "β
Dependencies installed"
@echo "π§ͺ Running tests..."
@python3 -m pytest
@echo "β
Tests passed"
@echo "π Running linting..."
@python3 -m flake8 replicated tests examples
@python3 -m mypy replicated
@echo "β
Linting passed"
@echo "π¨ Checking formatting..."
@python3 -m black --check replicated tests examples
@python3 -m isort --check-only replicated tests examples
@echo "β
Formatting passed"
@echo "π ALL CI CHECKS PASSED! Ready to push! π"
# Run all checks (formats code first)
check: format lint test
@echo "All checks passed!"