-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathMakefile
More file actions
71 lines (54 loc) · 1.83 KB
/
Makefile
File metadata and controls
71 lines (54 loc) · 1.83 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
.PHONY: help install test test-coverage format clean build upload check example tarball
help:
@echo 'Usage: make [target]'
@echo ''
@echo 'Targets:'
@awk 'BEGIN {FS = ":.*##"} /^[a-zA-Z_-]+:.*##/ {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
install: ## Install package in development mode
pip install -e .
test: ## Run all tests
pytest tests/ -v
test-coverage: ## Run tests with coverage report
pytest tests/ -v --cov=src/sugar --cov-report=html --cov-report=term
format: ## Format code with black
black src tests examples
format-check: ## Check code formatting without changes
black --check src tests examples
clean: ## Remove build artifacts and cache files
rm -rf build/
rm -rf dist/
find . -type d -name "*.egg-info" -exec rm -rf {} +
rm -rf htmlcov/
rm -rf .coverage
rm -rf .pytest_cache/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
build: ## Build the package
python -m build
tarball: build ## Build source tarball
@echo "Creating tarball..."
python -m build --sdist
@echo "Tarball created in dist/"
@ls -la dist/*.tar.gz
check: ## Check distribution with twine
twine check dist/*
upload-test: ## Upload to Test PyPI
twine upload --repository testpypi dist/*
upload: ## Upload to PyPI
twine upload dist/*
example: ## Run the basic example activity
cd examples && python basic_activity.py
test-toolkit: ## Run sugar module as a script
python -m sugar4
dev-test: clean test format-check ## Run all development checks
@echo "All development checks passed!"
dev-build: clean build check ## Build and check package
@echo "Package built and checked successfully!"
ci-test: ## Simulate CI pipeline
@echo "Running CI test simulation..."
make clean
make install-dev
make test-coverage
make build
make check
@echo "CI simulation completed successfully!"