- Convert _propose_block, _ensure_genesis_block to async methods in PoAProposer - Add await to gossip_broker.publish calls in block broadcasting - Add await to _ensure_genesis_block and _propose_block method calls - Update coordinator-api Python version constraint to >=3.13,<3.15 - Add torch ^2.10.0 dependency to coordinator-api - Add make_asgi_app import to prometheus_client in main.py - Export new routers: global
104 lines
2.5 KiB
Bash
Executable File
104 lines
2.5 KiB
Bash
Executable File
#!/bin/bash
|
|
# scripts/move-to-right-folder.sh
|
|
|
|
echo "🔄 Moving files to correct folders..."
|
|
|
|
# Colors
|
|
GREEN='\033[0;32m'
|
|
BLUE='\033[0;34m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m'
|
|
|
|
# Auto mode
|
|
AUTO_MODE=false
|
|
if [[ "$1" == "--auto" ]]; then
|
|
AUTO_MODE=true
|
|
fi
|
|
|
|
# Change to project root
|
|
cd "$(dirname "$0")/.."
|
|
|
|
# Function to move file with confirmation
|
|
move_file() {
|
|
local file="$1"
|
|
local target_dir="$2"
|
|
|
|
if [[ -f "$file" ]]; then
|
|
echo -e "${BLUE}📁 Moving '$file' to '$target_dir/'${NC}"
|
|
|
|
if [[ "$AUTO_MODE" == "true" ]]; then
|
|
mkdir -p "$target_dir"
|
|
mv "$file" "$target_dir/"
|
|
echo -e "${GREEN}✅ Moved automatically${NC}"
|
|
else
|
|
read -p "Move this file? (y/N): " -n 1 -r
|
|
echo
|
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
mkdir -p "$target_dir"
|
|
mv "$file" "$target_dir/"
|
|
echo -e "${GREEN}✅ Moved${NC}"
|
|
else
|
|
echo -e "${YELLOW}⏭️ Skipped${NC}"
|
|
fi
|
|
fi
|
|
fi
|
|
}
|
|
|
|
# Function to move directory with confirmation
|
|
move_dir() {
|
|
local dir="$1"
|
|
local target_dir="$2"
|
|
|
|
if [[ -d "$dir" ]]; then
|
|
echo -e "${BLUE}📁 Moving directory '$dir' to '$target_dir/'${NC}"
|
|
|
|
if [[ "$AUTO_MODE" == "true" ]]; then
|
|
mkdir -p "$target_dir"
|
|
mv "$dir" "$target_dir/"
|
|
echo -e "${GREEN}✅ Moved automatically${NC}"
|
|
else
|
|
read -p "Move this directory? (y/N): " -n 1 -r
|
|
echo
|
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
mkdir -p "$target_dir"
|
|
mv "$dir" "$target_dir/"
|
|
echo -e "${GREEN}✅ Moved${NC}"
|
|
else
|
|
echo -e "${YELLOW}⏭️ Skipped${NC}"
|
|
fi
|
|
fi
|
|
fi
|
|
}
|
|
|
|
# Move test files
|
|
for file in test_*.py test_*.sh run_mc_test.sh; do
|
|
move_file "$file" "dev/tests"
|
|
done
|
|
|
|
# Move development scripts
|
|
for file in patch_*.py fix_*.py simple_test.py; do
|
|
move_file "$file" "dev/scripts"
|
|
done
|
|
|
|
# Move multi-chain files
|
|
for file in MULTI_*.md; do
|
|
move_file "$file" "dev/multi-chain"
|
|
done
|
|
|
|
# Move environment directories
|
|
for dir in node_modules .venv cli_env; do
|
|
move_dir "$dir" "dev/env"
|
|
done
|
|
|
|
# Move cache directories
|
|
for dir in .pytest_cache .ruff_cache .vscode; do
|
|
move_dir "$dir" "dev/cache"
|
|
done
|
|
|
|
# Move configuration files
|
|
for file in .aitbc.yaml .aitbc.yaml.example .env.production .nvmrc .lycheeignore; do
|
|
move_file "$file" "config"
|
|
done
|
|
|
|
echo -e "${GREEN}🎉 File organization complete!${NC}"
|