-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
93 lines (74 loc) · 2.16 KB
/
Copy pathMakefile
File metadata and controls
93 lines (74 loc) · 2.16 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
# MiBiReMo Development Makefile
# Provides common development commands for the project
# Note: Assumes virtual environment is already activated
# Variables
PYTHON := python
PIP := pip
.DEFAULT_GOAL := help
# Help target
.PHONY: help
help: ## Show this help message
@echo "MiBiReMo Development Commands:"
@echo ""
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
# Setup and Installation
.PHONY: install-dev
install-dev: ## Install package in development mode with dev dependencies
$(PIP) install --no-cache-dir --editable .[dev]
.PHONY: install-doc
install-doc: ## Install documentation dependencies
$(PIP) install .[doc]
# Testing
.PHONY: test
test: ## Run tests with pytest
$(PYTHON) -m pytest -v
.PHONY: test-tox
test-tox: ## Run tests with tox (multiple Python versions)
tox
.PHONY: coverage
coverage: ## Generate test coverage report
$(PYTHON) -m coverage run
$(PYTHON) -m coverage report
.PHONY: coverage-html
coverage-html: coverage ## Generate HTML coverage report
$(PYTHON) -m coverage html
# Code Quality
.PHONY: lint
lint: ## Check code quality with ruff
$(PYTHON) -m ruff check .
.PHONY: lint-fix
lint-fix: ## Fix code quality issues automatically
$(PYTHON) -m ruff check . --fix
.PHONY: format
format: ## Format code with ruff
${PYTHON} -m ruff format .
# Documentation
.PHONY: docs-serve
docs-serve: ## Serve documentation locally
$(PYTHON) -m mkdocs serve
# Build and Release
.PHONY: build
build: ## Build package for distribution
$(PYTHON) -m build
.PHONY: bump-patch
bump-patch: ## Bump patch version
bump-my-version bump patch
.PHONY: bump-minor
bump-minor: ## Bump minor version
bump-my-version bump minor
.PHONY: bump-major
bump-major: ## Bump major version
bump-my-version bump major
# Utility targets
.PHONY: clean
clean: ## Clean temporary files and caches
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
.PHONY: all
all: install-dev lint test ## Run common development tasks (install, lint, test)