|
1 | 1 | # NetGraph Development Makefile |
2 | 2 | # This Makefile provides convenient shortcuts for common development tasks |
3 | 3 |
|
4 | | -.PHONY: help venv clean-venv dev install check check-ci lint format test qt clean docs docs-serve docs-diagrams build check-dist publish-test publish validate perf info check-python hooks |
| 4 | +.PHONY: help venv clean-venv dev install check check-ci lint format test qt build clean check-dist publish-test publish info hooks check-python docs docs-serve docs-diagrams validate perf |
5 | 5 |
|
6 | 6 | # Default target - show help |
7 | 7 | .DEFAULT_GOAL := help |
8 | 8 |
|
9 | 9 | # Toolchain (prefer project venv if present) |
10 | 10 | VENV_BIN := $(PWD)/venv/bin |
11 | | -# Use dynamic (recursive) assignment so a newly created venv is picked up |
12 | | -# Prefer the python3 on PATH (e.g., set by setup-python) |
13 | 11 | PY_FIND := $(shell command -v python3 2>/dev/null || command -v python 2>/dev/null) |
14 | 12 | PYTHON ?= $(if $(wildcard $(VENV_BIN)/python),$(VENV_BIN)/python,$(PY_FIND)) |
15 | | -PIP = $(PYTHON) -m pip |
16 | | -PYTEST = $(PYTHON) -m pytest |
17 | | -RUFF = $(PYTHON) -m ruff |
18 | | -PRECOMMIT = $(PYTHON) -m pre_commit |
| 13 | +PIP := $(PYTHON) -m pip |
| 14 | +PYTEST := $(PYTHON) -m pytest |
| 15 | +RUFF := $(PYTHON) -m ruff |
| 16 | +PRECOMMIT := $(PYTHON) -m pre_commit |
19 | 17 |
|
20 | 18 | help: |
21 | 19 | @echo "🔧 NetGraph Development Commands" |
@@ -181,17 +179,15 @@ build: |
181 | 179 |
|
182 | 180 | clean: |
183 | 181 | @echo "🧹 Cleaning build artifacts and cache files..." |
184 | | - @rm -rf build/ |
185 | | - @rm -rf dist/ |
186 | | - @rm -rf *.egg-info/ |
187 | | - @find . -type f -name "*.pyc" -delete |
188 | | - @find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true |
189 | | - @find . -type f -name "*.pyo" -delete |
190 | | - @find . -type f -name "*~" -delete |
191 | | - @find . -type f -name "*.orig" -delete |
| 182 | + @rm -rf build/ dist/ *.egg-info/ |
| 183 | + @rm -rf .pytest_cache .ruff_cache .mypy_cache htmlcov .coverage coverage.xml coverage-*.xml .benchmarks .pytest-benchmark || true |
| 184 | + @find . -path "./venv" -prune -o -type f -name "*.pyc" -delete 2>/dev/null || true |
| 185 | + @find . -path "./venv" -prune -o -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true |
| 186 | + @find . -path "./venv" -prune -o -type f -name "*.pyo" -delete 2>/dev/null || true |
| 187 | + @find . -path "./venv" -prune -o -type f -name "*~" -delete 2>/dev/null || true |
| 188 | + @find . -path "./venv" -prune -o -type f -name "*.orig" -delete 2>/dev/null || true |
192 | 189 | @echo "✅ Cleanup complete!" |
193 | 190 |
|
194 | | - |
195 | 191 | # Publishing |
196 | 192 | check-dist: |
197 | 193 | @echo "🔍 Checking distribution packages..." |
|
0 commit comments