pipeflow 0.0.3

A lightweight, configuration-driven data pipeline framework
Documentation
# Pipeflow Makefile
# A lightweight, configuration-driven data pipeline framework

.DEFAULT_GOAL := all

# =============================================================================
# Configuration
# =============================================================================
CARGO        := cargo
BINARY_NAME  := pipeflow

# =============================================================================
# PHONY Targets
# =============================================================================
.PHONY: all fmt lint lint-rust lint-md check test test-integration test-all doc doc-open build release clean update help

# =============================================================================
# Development Workflow
# =============================================================================

## Primary Targets
all: fmt lint check test doc build          ## Run full CI pipeline (fmt, lint, check, test, doc, build)

## Code Quality
fmt:                                     ## Format code with rustfmt
	@echo "Formatting code..."
	@$(CARGO) fmt --all

lint: lint-rust lint-md                  ## Run all linters

lint-rust:                               ## Lint Rust code with clippy
	@echo "Linting Rust code..."
	@$(CARGO) clippy --all-targets --all-features -- -D warnings

lint-md:                                 ## Lint Markdown files
	@echo "Linting Markdown files..."
	@if command -v markdownlint >/dev/null 2>&1; then \
		markdownlint .; \
	else \
		echo "markdownlint not found; skipping Markdown lint. Install it with 'npm i -g markdownlint-cli'."; \
	fi

check:                                   ## Type-check without building
	@echo "Type-checking code..."
	@$(CARGO) check --all-targets --all-features

# =============================================================================
# Testing
# =============================================================================

test:                                    ## Run unit tests
	@echo "Running unit tests..."
	@$(CARGO) test --lib --bins

test-integration:                        ## Run integration tests
	@echo "Running integration tests..."
	@$(CARGO) test --test '*'

test-all:                                ## Run all tests (unit + integration + doc)
	@echo "Running all tests..."
	@$(CARGO) test --all-targets --all-features -- --include-ignored

# =============================================================================
# Documentation
# =============================================================================

doc:                                     ## Build documentation
	@echo "Building documentation..."
	@$(CARGO) doc --no-deps

doc-open:                                ## Build and open documentation in browser
	@echo "Building and opening documentation..."
	@$(CARGO) doc --no-deps --open

# =============================================================================
# Build & Run
# =============================================================================

build:                                   ## Build debug binary
	@echo "Building debug binary..."
	@$(CARGO) build

release:                                 ## Build optimized release binary
	@echo "Building release binary..."
	@$(CARGO) build --release

# =============================================================================
# Maintenance
# =============================================================================

clean:                                   ## Remove build artifacts
	@echo "Cleaning build artifacts..."
	@$(CARGO) clean

update:                                  ## Update dependencies
	@echo "Updating dependencies..."
	@$(CARGO) update

# =============================================================================
# Help
# =============================================================================

help:                                    ## Show available targets
	@echo "Pipeflow - Available targets:"
	@echo ""
	@awk 'BEGIN {FS = ":.*##"} /^[a-zA-Z_-]+:.*##/ { \
		printf "  \033[36m%-18s\033[0m %s\n", $$1, $$2 \
	}' $(MAKEFILE_LIST)
	@echo ""
	@echo "Examples:"
	@echo "  make                    # Run full CI pipeline"
	@echo "  make test-all           # Run all tests"
	@echo "  make release            # Build optimized binary"