Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
File size: 5,359 Bytes
61d29fc | 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 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | .PHONY: help install install-frontend install-docs build-frontend build-docs clean test run dev dev-frontend dev-docs start-all stop-all dev-full docker-up docker-down deploy-databricks
help:
@echo "π¦· Open Navigator - Makefile Commands"
@echo "===================================================="
@echo ""
@echo "π Quick Start:"
@echo " make start-all - Start ALL services (API + Dashboard + Docs) with tmux"
@echo " make stop-all - Stop all running services"
@echo ""
@echo "π Python Backend:"
@echo " make install - Install Python dependencies in venv"
@echo " make dev - Start backend with auto-reload"
@echo " make run - Start backend (production)"
@echo ""
@echo "βοΈ React Dashboard:"
@echo " make install-frontend - Install dashboard npm dependencies"
@echo " make build-frontend - Build React dashboard for production"
@echo " make dev-frontend - Start dashboard dev server"
@echo ""
@echo "π Documentation Site:"
@echo " make install-docs - Install Docusaurus dependencies"
@echo " make build-docs - Build documentation for production"
@echo " make dev-docs - Start documentation dev server"
@echo ""
@echo "βοΈ Deployment:"
@echo " make deploy-databricks - Deploy to Databricks Apps"
@echo ""
@echo "π³ Docker:"
@echo " make docker-up - Start Docker containers"
@echo " make docker-down - Stop Docker containers"
@echo ""
@echo "π§ͺ Testing:"
@echo " make test - Run test suite"
@echo " make clean - Remove build artifacts"
@echo ""
install:
@echo "π¦ Creating virtual environment and installing dependencies..."
@chmod +x install.sh
@./install.sh
install-frontend:
@echo "π¦ Installing dashboard dependencies..."
@cd frontend && npm install
@echo "β
Dashboard dependencies installed!"
install-docs:
@echo "π¦ Installing documentation dependencies..."
@cd website && npm install
@echo "β
Documentation dependencies installed!"
build-frontend:
@echo "π¨ Building React dashboard..."
@cd frontend && npm run build
@echo "β
Dashboard built to api/static/"
build-docs:
@echo "π¨ Building documentation site..."
@cd website && npm run build
@echo "β
Documentation built to website/build/"
clean:
@echo "π§Ή Cleaning up..."
@rm -rf .venv venv
@rm -rf frontend/node_modules frontend/dist
@rm -rf website/node_modules website/build website/.docusaurus
@rm -rf api/static
@rm -rf __pycache__
@find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
@find . -type f -name "*.pyc" -delete
@find . -type f -name "*.pyo" -delete
@rm -rf .pytest_cache
@rm -rf .coverage
@rm -rf htmlcov
@rm -rf dist
@rm -rf build
@rm -rf *.egg-info
@rm -rf logs/*.pid logs/*.log
@echo "β
Cleanup complete"
test:
@echo "π§ͺ Running tests..."
@. venv/bin/activate && pytest tests/ -v
run: build-frontend
@echo "π Starting application (production mode)..."
@. venv/bin/activate && uvicorn api.app:app --host 0.0.0.0 --port 8000
dev:
@echo "π§ Starting backend with auto-reload..."
@echo "π‘ Backend running at http://localhost:8000"
@. venv/bin/activate && uvicorn api.app:app --reload
dev-frontend:
@echo "βοΈ Starting dashboard dev server..."
@echo "π‘ Dashboard running at http://localhost:5173"
@cd frontend && npm run dev
dev-docs:
@echo "π Starting documentation dev server..."
@echo "π‘ Documentation running at http://localhost:3000"
@cd website && npm start
start-all:
@echo "π Starting all services with tmux..."
@chmod +x start-all.sh
@./start-all.sh
stop-all:
@echo "π Stopping all services..."
@chmod +x stop-all.sh
@./stop-all.sh
dev-full:
@echo "π Use 'make start-all' for better experience with tmux!"
@echo ""
@echo "Starting backend and frontend (manual)..."
@echo "π‘ Backend: http://localhost:8000"
@echo "π‘ Dashboard: http://localhost:5173"
@echo "π‘ Docs: http://localhost:3000 (run 'make dev-docs' in another terminal)"
@echo ""
@. venv/bin/activate && uvicorn api.app:app --reload & \
cd frontend && npm run dev
deploy-databricks:
@echo "βοΈ Deploying to Databricks Apps..."
@chmod +x scripts/deploy-databricks-app.sh
@./scripts/deploy-databricks-app.sh
docker-up:
@echo "Starting Docker containers..."
@docker-compose up -d
@echo "β Containers started"
@echo " API: http://localhost:8000"
@echo " Docs: http://localhost:8000/docs"
docker-down:
@echo "Stopping Docker containers..."
@docker-compose down
@echo "β Containers stopped"
example:
@echo "Running example workflow..."
@. venv/bin/activate && python examples/example_workflow.py
heatmap:
@echo "Generating example heatmap..."
@. venv/bin/activate && python main.py generate-heatmap --output example_heatmap.html
@echo "β Heatmap saved to example_heatmap.html"
init:
@echo "Initializing system..."
@. venv/bin/activate && python main.py init
status:
@echo "Checking system status..."
@. venv/bin/activate && python main.py status
format:
@echo "Formatting code..."
@. venv/bin/activate && black .
@. venv/bin/activate && ruff check . --fix
@echo "β Code formatted"
lint:
@echo "Linting code..."
@. venv/bin/activate && ruff check .
@. venv/bin/activate && mypy agents/ pipeline/ visualization/ api/
|