File size: 919 Bytes
ce4bc73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
779ae91
 
 
 
 
 
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
#!/bin/bash
# Script to clean up generated files

echo "Cleaning up generated files..."

# Get the directory of this script
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

# Get the project root directory
PROJECT_ROOT="$( cd "$SCRIPT_DIR/.." &> /dev/null && pwd )"

# Remove Python cache files
echo "Removing Python cache files..."
find "$PROJECT_ROOT" -type d -name "__pycache__" -exec rm -rf {} +
find "$PROJECT_ROOT" -type f -name "*.pyc" -delete
find "$PROJECT_ROOT" -type f -name "*.pyo" -delete
find "$PROJECT_ROOT" -type f -name "*.pyd" -delete

# Remove model files
echo "Removing model files..."
rm -rf "$PROJECT_ROOT/models"/*.pkl

# Remove cache files
echo "Removing cache files..."
rm -rf "$PROJECT_ROOT/cache"/*

# Remove Poetry cache files
echo "Removing Poetry cache files..."
rm -rf "$PROJECT_ROOT/.pytest_cache"
rm -rf "$PROJECT_ROOT/.ruff_cache"

echo "Cleanup complete!"