-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (45 loc) · 1.94 KB
/
Makefile
File metadata and controls
56 lines (45 loc) · 1.94 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
.PHONY: install uninstall test test-unit test-integration test-all test-coverage lint clean help completion
help: ## Show this help message
@echo 'Usage: make [target]'
@echo ''
@echo 'Targets:'
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
install: ## Install the project locally
./setup.sh
uninstall: ## Remove the project from the system
@echo "Removing pem..."
rm -f $(HOME)/.local/bin/pem
@echo "To remove configuration and data, delete ~/.config/python-env-manager and ~/.local/share/python-env-manager manually."
test: test-all ## Run all tests (shorthand for test-all)
test-unit: ## Run unit tests with bats
@echo "Running unit tests..."
@if command -v bats &>/dev/null; then \
bats tests/unit/*.bats; \
else \
echo "Error: bats not found. Install with: npm install -g bats"; \
echo "Or try: brew install bats-core (macOS) or apt-get install bats (Ubuntu)"; \
exit 1; \
fi
test-integration: ## Run integration tests
@echo "Running integration tests..."
./tests/run_tests.sh
test-all: test-unit test-integration ## Run all tests (unit + integration)
test-coverage: ## Run tests with coverage (requires kcov)
@echo "Running tests with coverage..."
@if command -v kcov &>/dev/null; then \
mkdir -p coverage; \
kcov --exclude-pattern=/usr coverage tests/unit/*.bats; \
kcov --exclude-pattern=/usr coverage tests/run_tests.sh; \
echo "Coverage report generated in coverage/index.html"; \
else \
echo "Error: kcov not found. Install from https://github.com/SimonKagstrom/kcov"; \
exit 1; \
fi
lint: ## Run linting checks
pre-commit run --all-files
completion: ## Output shell completion script
@cat scripts/utils/completion.sh
clean: ## Clean up build artifacts and temporary files
rm -rf build/ dist/ *.egg-info .pytest_cache .coverage htmlcov coverage/
find . -name "__pycache__" -type d -exec rm -rf {} +
find . -name "*.pyc" -delete