-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
110 lines (78 loc) · 4.07 KB
/
Copy pathMakefile
File metadata and controls
110 lines (78 loc) · 4.07 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Makefile for vresto package management
.PHONY: help bump-patch bump-minor bump-major release-patch release-minor release-major build test test-parallel coverage coverage-html coverage-report lint lint-fix format format-fix clean dev-install docs-build docs-serve publish version check-release docker-up docker-down docker-logs docker-rebuild ensure-env
help: ## Show this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
# Version bumping
bump-patch: ## Bump patch version (0.1.14 -> 0.1.15)
python3 scripts/bump_version.py patch
bump-minor: ## Bump minor version (0.1.14 -> 0.2.0)
python3 scripts/bump_version.py minor
bump-major: ## Bump major version (0.1.14 -> 1.0.0)
python3 scripts/bump_version.py major
# Release process
release-patch: ## Bump patch version and create release
./scripts/release.sh patch
release-minor: ## Bump minor version and create release
./scripts/release.sh minor
release-major: ## Bump major version and create release
./scripts/release.sh major
# Development
# UI/Web Interface
app: ## Run the Sentinel Browser web interface
uv run python src/vresto/ui/app.py
docker-up: ensure-env ## Start vresto with Docker Compose (creates .env from .env.example if missing)
docker compose up -d
docker-rebuild: ensure-env ## Rebuild and start vresto with Docker Compose
docker compose up -d --build
docker-down: ## Stop and remove Docker Compose services
docker compose down
docker-logs: ## Follow Docker Compose logs
docker compose logs -f
ensure-env: ## Create .env from .env.example when missing
@if [ ! -f .env ] && [ -f .env.example ]; then cp .env.example .env && echo "Created .env from .env.example"; fi
# Testing
test-parallel: ## Run tests in parallel
uv run --extra dev pytest -n auto tests/
test: ## Run tests
uv run --extra dev pytest tests/
coverage: ## Run tests with coverage (terminal report)
uv run --extra dev pytest --cov --cov-report=term-missing tests/
coverage-html: ## Run tests and generate HTML coverage report at htmlcov/index.html
uv run --extra dev pytest --cov --cov-report=term --cov-report=html tests/
@echo "HTML coverage report: htmlcov/index.html"
coverage-report: ## Regenerate the snapshot block in tests/COVERAGE.md
uv run --extra dev python scripts/update_coverage_report.py
lint: ## Run linting
uv run --extra dev ruff check .
lint-fix: ## Run linting and auto-fix issues
uv run --extra dev ruff check . --fix
format: ## Check code formatting
uv run --extra dev ruff format --preview --check .
format-fix: ## Auto-format code
uv run --extra dev ruff format --preview .
build: ## Build package
uv build
clean: ## Clean build artifacts
rm -rf dist/ build/ *.egg-info/
# Quick development tasks
dev-install: ## Install package in development mode with dev dependencies
uv sync --extra dev
docs-build: ## Install docs dependencies and build the MkDocs documentation site
uv sync --extra docs
uv run --extra docs mkdocs build -f mkdocs.yml
docs-serve: ## Install docs dependencies and serve the MkDocs site locally at http://127.0.0.1:8000
uv sync --extra docs
# Use uv run so the correct project venv and deps are used
uv run --extra docs mkdocs serve -f mkdocs.yml
publish: ## Publish to PyPI (manual - normally done by GitHub Actions)
@echo "⚠️ Note: Publishing is normally automated via GitHub Actions"
@echo "🚀 To publish: git tag vX.Y.Z && git push --tags"
@echo ""
@echo "🔄 Manual publish (not recommended):"
uv publish
# Show current version
version: ## Show current version
@python3 -c "import sys; sys.path.insert(0, 'src'); from vresto._version import __version__; print(f'Current version: {__version__}')"
# Check release status
check-release: ## Check if current version is published
@uv run python3 -c "import sys, requests; sys.path.insert(0, 'src'); from vresto._version import __version__; r=requests.get(f'https://pypi.org/pypi/vresto/{__version__}/json'); print(f'✅ Version {__version__} is published' if r.status_code==200 else f'❌ Version {__version__} not found on PyPI')"