-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (34 loc) · 1.51 KB
/
Makefile
File metadata and controls
47 lines (34 loc) · 1.51 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
.PHONY: help install install-dev test test-fast lint format clean build publish
help: ## Show this help message
@echo "Usage: make [target]"
@echo ""
@echo "Available targets:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
install: ## Install package in development mode
uv sync
install-dev: ## Install package with dev dependencies
uv sync --all-extras
test: ## Run all tests with coverage
uv run pytest tests/ -v --tb=short --cov=beamz --cov-report=xml --cov-report=term-missing
test-fast: ## Run tests excluding slow ones
uv run pytest tests/ -v -m "not slow" --tb=short
test-single: ## Run a single test file (usage: make test-single FILE=test_physics_energy.py)
uv run pytest tests/$(FILE) -v --tb=short
lint: ## Run linting checks
uv run flake8 beamz/ tests/
format: ## Format code with black and isort
uv run black beamz/ tests/
uv run isort beamz/ tests/
format-check: ## Check if code is formatted correctly
uv run black --check beamz/ tests/
uv run isort --check beamz/ tests/
clean: ## Clean build artifacts
rm -rf build/ dist/ *.egg-info/ .pytest_cache/ .coverage htmlcov/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
build: ## Build distribution packages
uv build
publish: ## Publish to PyPI (requires credentials)
uv run twine upload dist/*
version: ## Create new version release (usage: make version VERSION=0.1.X)
python release_version.py $(VERSION)