Spaces:
Runtime error
Runtime error
| # Exit on error | |
| set -e | |
| echo "Starting cleanup..." | |
| # Define core files to keep | |
| CORE_FILES=( | |
| "agentic_system.py" | |
| "orchestrator.py" | |
| "team_management.py" | |
| "meta_learning.py" | |
| "config.py" | |
| "space.yml" | |
| "app.py" | |
| "startup.sh" | |
| "check_versions.py" | |
| "requirements.txt" | |
| "upload_to_hub.py" | |
| "app_space.sh" | |
| ".gitattributes" | |
| ) | |
| # Remove backup and temporary files (excluding reasoning directory) | |
| find . -type f ! -path "./reasoning/*" \( -name "*.bak*" -o -name "*.backup" -o -name "*.temp" -o -name "*.log" \) -delete | |
| # Remove cache files (excluding reasoning directory) | |
| find . -type d ! -path "./reasoning/*" -name "__pycache__" -exec rm -rf {} + | |
| find . -type f ! -path "./reasoning/*" -name "*.pyc" -delete | |
| # Remove sample and simplified files | |
| rm -f simple_reasoning.py quick_check.py | |
| rm -rf simple_reasoning/ | |
| # Remove environment files (after backing up if needed) | |
| if [ -f .env ]; then | |
| mv .env .env.backup | |
| fi | |
| rm -f .env.example | |
| # Remove quantum_learning.py since its functionality exists in reasoning/quantum.py | |
| rm -f quantum_learning.py | |
| echo "Cleanup complete! All files in the reasoning directory have been preserved." | |