| |
| |
|
|
| .PHONY: help install test lint format docker clean |
|
|
| |
| 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: |
| pip install -r requirements.txt |
| pip install -r requirements-dev.txt |
|
|
| |
| test: |
| python -m pytest tests/ -v --cov=. |
|
|
| |
| lint: |
| @echo "Running linting..." |
| flake8 . --max-line-length=88 --extend-ignore=E203 |
| mypy . --ignore-missing-imports |
| bandit -r . -x tests |
|
|
| |
| format: |
| black . |
| isort . |
|
|
| |
| docker: |
| @echo "Building DTO Docker image..." |
| docker build -t adaptai/dto-framework:latest . |
|
|
| |
| clean: |
| @echo "Cleaning build artifacts..." |
| rm -rf __pycache__ */__pycache__ *.pyc |
| rm -rf .pytest_cache .coverage htmlcov |
| rm -rf build/ dist/ *.egg-info |
|
|
| |
| validate: |
| python validate-ci.py |
|
|
| |
| generate: |
| python generate.py |
|
|
| |
| docs: |
| @echo "Building documentation..." |
| mkdocs build |
|
|
| |
| dev: |
| @echo "Starting development server..." |
| python -m http.server 8000 |
|
|
| |
| run: |
| @echo "Starting DTO framework..." |
| python services/dto_service_manager.py |
|
|
| |
| security: |
| @echo "Running security scan..." |
| bandit -r . |
| safety check |
|
|
| |
| update: |
| @echo "Updating dependencies..." |
| pip install --upgrade -r requirements.txt |
|
|
| |
| dev-container: |
| @echo "Starting development container..." |
| docker compose -f docker-compose.dev.yml up --build |
|
|
| |
| migrate: |
| @echo "Running database migrations..." |
| python database/migrate.py |
|
|
| |
| backup: |
| @echo "Creating backup..." |
| tar czf dto-backup-$(date +%Y%m%d-%H%M%S).tar.gz . --exclude=".git" --exclude="__pycache__" |
|
|
| |
| perf-test: |
| @echo "Running performance tests..." |
| python tests/performance_test.py |
|
|
| |
| release: |
| @echo "Preparing release..." |
| make test |
| make lint |
| make security |
| make docs |
| @echo "Release preparation complete!" |
|
|
| |
| quick-check: |
| @echo "Running quick validation..." |
| python validate-ci.py --quick |
| @echo "Quick check passed!" |
|
|
| |
| setup: |
| @echo "Setting up development environment..." |
| make install |
| make generate |
| @echo "Environment setup complete!" |