-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidate-dlplus.sh
More file actions
executable file
Β·159 lines (137 loc) Β· 6.42 KB
/
validate-dlplus.sh
File metadata and controls
executable file
Β·159 lines (137 loc) Β· 6.42 KB
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
#!/bin/bash
# DL+ System Validation Script
# Ψ³ΩΨ±ΩΨ¨Ψͺ Ψ§ΩΨͺΨΩΩ Ω
Ω ΩΨΈΨ§Ω
DL+
set -e
# Colors
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
echo -e "${BLUE}βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ${NC}"
echo -e "${BLUE}π§ DL+ System Validation${NC}"
echo -e "${BLUE} Ψ§ΩΨͺΨΩΩ Ω
Ω ΩΨΈΨ§Ω
DL+${NC}"
echo -e "${BLUE}βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ${NC}"
echo ""
# Function to print check
check() {
if [ $? -eq 0 ]; then
echo -e "${GREEN}β
$1${NC}"
else
echo -e "${RED}β $1 - FAILED${NC}"
exit 1
fi
}
# 1. Check directory structure
echo -e "${YELLOW}π Checking directory structure...${NC}"
[ -d "dlplus" ] && check "dlplus directory exists"
[ -d "dlplus/core" ] && check "dlplus/core directory exists"
[ -d "dlplus/api" ] && check "dlplus/api directory exists"
[ -d "dlplus/config" ] && check "dlplus/config directory exists"
[ -d "dlplus/agents" ] && check "dlplus/agents directory exists"
[ -d "dlplus/utils" ] && check "dlplus/utils directory exists"
[ -d "dlplus/docs" ] && check "dlplus/docs directory exists"
[ -d "examples" ] && check "examples directory exists"
[ -d "tests" ] && check "tests directory exists"
echo ""
# 2. Check core files
echo -e "${YELLOW}π Checking core files...${NC}"
[ -f "dlplus/__init__.py" ] && check "dlplus/__init__.py exists"
[ -f "dlplus/main.py" ] && check "dlplus/main.py exists"
[ -f "dlplus/core/intelligence_core.py" ] && check "intelligence_core.py exists"
[ -f "dlplus/core/arabic_processor.py" ] && check "arabic_processor.py exists"
[ -f "dlplus/core/context_analyzer.py" ] && check "context_analyzer.py exists"
echo ""
# 3. Check API files
echo -e "${YELLOW}π Checking API files...${NC}"
[ -f "dlplus/api/fastapi_connector.py" ] && check "fastapi_connector.py exists"
[ -f "dlplus/api/internal_api.py" ] && check "internal_api.py exists"
echo ""
# 4. Check configuration files
echo -e "${YELLOW}βοΈ Checking configuration files...${NC}"
[ -f "dlplus/config/settings.py" ] && check "settings.py exists"
[ -f "dlplus/config/models_config.py" ] && check "models_config.py exists"
[ -f "dlplus/config/agents_config.py" ] && check "agents_config.py exists"
echo ""
# 5. Check agents
echo -e "${YELLOW}π€ Checking agents...${NC}"
[ -f "dlplus/agents/base_agent.py" ] && check "base_agent.py exists"
[ -f "dlplus/agents/web_retrieval_agent.py" ] && check "web_retrieval_agent.py exists"
[ -f "dlplus/agents/code_generator_agent.py" ] && check "code_generator_agent.py exists"
echo ""
# 6. Check utilities
echo -e "${YELLOW}π§ Checking utilities...${NC}"
[ -f "dlplus/utils/logger.py" ] && check "logger.py exists"
[ -f "dlplus/utils/helpers.py" ] && check "helpers.py exists"
echo ""
# 7. Check examples
echo -e "${YELLOW}π‘ Checking examples...${NC}"
[ -f "examples/basic_usage.py" ] && check "basic_usage.py exists"
[ -f "examples/agent_usage.py" ] && check "agent_usage.py exists"
[ -f "examples/api_client_usage.py" ] && check "api_client_usage.py exists"
echo ""
# 8. Check tests
echo -e "${YELLOW}π§ͺ Checking tests...${NC}"
[ -f "tests/test_core.py" ] && check "test_core.py exists"
[ -f "tests/test_arabic_processor.py" ] && check "test_arabic_processor.py exists"
[ -f "tests/test_agents.py" ] && check "test_agents.py exists"
[ -f "tests/conftest.py" ] && check "conftest.py exists"
echo ""
# 9. Check documentation
echo -e "${YELLOW}π Checking documentation...${NC}"
[ -f "DLPLUS_README.md" ] && check "DLPLUS_README.md exists"
[ -f "DLPLUS_DEPLOYMENT.md" ] && check "DLPLUS_DEPLOYMENT.md exists"
[ -f "DLPLUS_IMPLEMENTATION_SUMMARY.md" ] && check "DLPLUS_IMPLEMENTATION_SUMMARY.md exists"
[ -f "dlplus/docs/DLPLUS_SYSTEM.md" ] && check "DLPLUS_SYSTEM.md exists"
echo ""
# 10. Check scripts
echo -e "${YELLOW}π Checking scripts...${NC}"
[ -f "start-dlplus.sh" ] && check "start-dlplus.sh exists"
[ -x "start-dlplus.sh" ] && check "start-dlplus.sh is executable"
echo ""
# 11. Check configuration templates
echo -e "${YELLOW}βοΈ Checking configuration templates...${NC}"
[ -f ".env.dlplus.example" ] && check ".env.dlplus.example exists"
[ -f "requirements.txt" ] && check "requirements.txt exists"
echo ""
# 12. Count files
echo -e "${YELLOW}π Statistics...${NC}"
PYTHON_FILES=$(find dlplus -name "*.py" | wc -l)
echo -e "${GREEN} Python files: $PYTHON_FILES${NC}"
EXAMPLE_FILES=$(find examples -name "*.py" | wc -l)
echo -e "${GREEN} Example files: $EXAMPLE_FILES${NC}"
TEST_FILES=$(find tests -name "*.py" | wc -l)
echo -e "${GREEN} Test files: $TEST_FILES${NC}"
DOC_FILES=$(find . -maxdepth 2 -name "DLPLUS*.md" | wc -l)
echo -e "${GREEN} Documentation files: $DOC_FILES${NC}"
echo ""
# 13. Python syntax check
echo -e "${YELLOW}π Checking Python syntax...${NC}"
if command -v python3 &> /dev/null; then
for file in $(find dlplus -name "*.py"); do
python3 -m py_compile "$file" 2>/dev/null
if [ $? -eq 0 ]; then
echo -e "${GREEN}β
$file - syntax OK${NC}"
else
echo -e "${RED}β $file - syntax error${NC}"
exit 1
fi
done
else
echo -e "${YELLOW}β οΈ Python3 not found, skipping syntax check${NC}"
fi
echo ""
# Final summary
echo -e "${BLUE}βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ${NC}"
echo -e "${GREEN}β
DL+ System Validation Complete!${NC}"
echo -e "${GREEN} Ψ§ΩΨͺΩ
Ω Ψ§ΩΨͺΨΩΩ Ω
Ω ΩΨΈΨ§Ω
DL+ Ψ¨ΩΨ¬Ψ§Ψ!${NC}"
echo -e "${BLUE}βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ${NC}"
echo ""
echo -e "${GREEN}All components are in place and validated.${NC}"
echo -e "${GREEN}The DL+ system is ready for deployment!${NC}"
echo ""
echo -e "${BLUE}Next steps:${NC}"
echo -e " 1. Install dependencies: ${YELLOW}pip install -r requirements.txt${NC}"
echo -e " 2. Configure settings: ${YELLOW}cp .env.dlplus.example .env${NC}"
echo -e " 3. Start the system: ${YELLOW}./start-dlplus.sh${NC}"
echo ""