#!/bin/bash
# Clean up release directory - remove test scripts and cleanup tools
# Keep only essential documentation and one-click run script

set -e

cd /ssd/0/wzq/Multi_Med/release

echo "Cleaning up release directory..."
echo ""

# Remove test scripts
echo "Removing test scripts..."
rm -f test_offline_dataset.py
rm -f test_release_run.py

# Remove cleanup/analysis scripts from scripts directory
echo "Removing cleanup scripts..."
rm -f scripts/list_datapress_files.py
rm -f scripts/list_unused_datapress_files.py
rm -f scripts/remove_unused_datapress.sh
rm -f scripts/extract_sample_data.py
rm -f scripts/create_offline_config.py

# Remove redundant documentation (keep only essential)
echo "Removing redundant documentation..."
rm -f DATA_FILES_COPIED.md
rm -f DATAPRESS_CLEANUP_SUMMARY.md
rm -f DATAPRESS_FILES_LIST.md
rm -f RELEASE_VERIFICATION.md
rm -f RUN_INSTRUCTIONS.md
rm -f SAMPLE_DATA_SUMMARY.md
rm -f UNUSED_DATAPRESS_FILES.md

echo ""
echo "Cleanup complete!"
echo ""
echo "Remaining essential files:"
echo "  - README.md (main documentation)"
echo "  - QUICK_START.md (quick start guide)"
echo "  - OFFLINE_DATA_README.md (offline data guide)"
echo "  - run_training.sh (one-click run script)"
echo "  - train_mortality_24h_48h.py (training script)"

