# DTO Framework Makefile # Common tasks and utilities .PHONY: help install test lint format docker clean # Default target help: @echo "DTO Framework Build System" @echo "" @echo "Usage:" @echo " make [target]" @echo "" @echo "Targets:" @echo " install Install dependencies" @echo " test Run tests" @echo " lint Run linting and code checks" @echo " format Format code" @echo " docker Build Docker image" @echo " clean Clean build artifacts" @echo " validate Validate DTO manifest" @echo " generate Generate configuration" @echo " docs Build documentation" # Install dependencies install: pip install -r requirements.txt pip install -r requirements-dev.txt # Run tests test: python -m pytest tests/ -v --cov=. # Linting and code quality lint: @echo "Running linting..." flake8 . --max-line-length=88 --extend-ignore=E203 mypy . --ignore-missing-imports bandit -r . -x tests # Code formatting format: black . isort . # Build Docker image docker: @echo "Building DTO Docker image..." docker build -t adaptai/dto-framework:latest . # Clean build artifacts clean: @echo "Cleaning build artifacts..." rm -rf __pycache__ */__pycache__ *.pyc rm -rf .pytest_cache .coverage htmlcov rm -rf build/ dist/ *.egg-info # Validate DTO manifest validate: python validate-ci.py # Generate configuration generate: python generate.py # Build documentation docs: @echo "Building documentation..." mkdocs build # Development server dev: @echo "Starting development server..." python -m http.server 8000 # Production run run: @echo "Starting DTO framework..." python services/dto_service_manager.py # Security scan security: @echo "Running security scan..." bandit -r . safety check # Dependency update update: @echo "Updating dependencies..." pip install --upgrade -r requirements.txt # Containerized development dev-container: @echo "Starting development container..." docker compose -f docker-compose.dev.yml up --build # Database migration migrate: @echo "Running database migrations..." python database/migrate.py # Backup configuration backup: @echo "Creating backup..." tar czf dto-backup-$(date +%Y%m%d-%H%M%S).tar.gz . --exclude=".git" --exclude="__pycache__" # Performance test perf-test: @echo "Running performance tests..." python tests/performance_test.py # Release preparation release: @echo "Preparing release..." make test make lint make security make docs @echo "Release preparation complete!" # Quick validation quick-check: @echo "Running quick validation..." python validate-ci.py --quick @echo "Quick check passed!" # Environment setup setup: @echo "Setting up development environment..." make install make generate @echo "Environment setup complete!"