-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify_docs_update.sh
More file actions
101 lines (88 loc) · 3.73 KB
/
verify_docs_update.sh
File metadata and controls
101 lines (88 loc) · 3.73 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
#!/bin/bash
# Documentation Update Verification Script
# Checks that all documentation has been consistently updated
echo "╔══════════════════════════════════════════════════════════════════╗"
echo "║ Documentation Update Verification ║"
echo "╚══════════════════════════════════════════════════════════════════╝"
echo ""
# Color codes
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
PASS=0
FAIL=0
check_file_exists() {
if [ -f "$1" ]; then
echo -e "${GREEN}✓${NC} File exists: $1"
((PASS++))
else
echo -e "${RED}✗${NC} File missing: $1"
((FAIL++))
fi
}
check_content() {
if grep -q "$2" "$1" 2>/dev/null; then
echo -e "${GREEN}✓${NC} $3"
((PASS++))
else
echo -e "${RED}✗${NC} $3"
((FAIL++))
fi
}
echo "1. Checking API Documentation Files..."
check_file_exists "api/README.md"
check_file_exists "api/QUICK_START.md"
check_file_exists "docs/API_WEEK1_SUMMARY.md"
check_file_exists "docs/API_WEEK2_SUMMARY.md"
check_file_exists "test_api.py"
echo ""
echo "2. Checking Main Documentation Updates..."
check_content "README.md" "Phase 4 In Progress" "README has Phase 4 status"
check_content "README.md" "Flask" "README mentions Flask"
check_content "docs/ROADMAP.md" "IN PROGRESS - 2/4" "ROADMAP shows Phase 4 progress"
check_content "CLAUDE.md" "Run API" "CLAUDE.md has API commands"
echo ""
echo "3. Checking Metric Updates..."
check_content "docs/ROADMAP.md" "209" "Test count updated to 209"
check_content "docs/ARCHITECTURE.md" "209" "Architecture test count updated"
check_content "docs/website/index.md" "209" "Website test count updated"
check_content "README.md" "18,000" "LOC updated in README or ROADMAP"
echo ""
echo "4. Checking API References..."
check_content "docs/DOCS_INDEX.md" "API Documentation" "DOCS_INDEX has API section"
check_content "docs/ARCHITECTURE.md" "API Layer" "ARCHITECTURE has API section"
check_content "README.md" "api/README" "README links to API docs"
echo ""
echo "5. Checking Consistency..."
# Check that Phase 4 is not marked as "PLANNED" anywhere
if grep -r "Phase 4.*PLANNED" docs/ROADMAP.md README.md 2>/dev/null; then
echo -e "${RED}✗${NC} Phase 4 still marked as PLANNED somewhere"
((FAIL++))
else
echo -e "${GREEN}✓${NC} Phase 4 no longer marked as PLANNED"
((PASS++))
fi
# Check that test count is consistent
TEST_COUNTS=$(grep -rh "170 tests\|209 tests" README.md docs/*.md CLAUDE.md 2>/dev/null | wc -l)
if [ "$TEST_COUNTS" -gt 0 ]; then
echo -e "${GREEN}✓${NC} Test counts found in documentation"
((PASS++))
else
echo -e "${YELLOW}⚠${NC} Warning: Test counts not prominently featured"
fi
echo ""
echo "╔══════════════════════════════════════════════════════════════════╗"
echo "║ Verification Results ║"
echo "╚══════════════════════════════════════════════════════════════════╝"
echo ""
echo -e "Passed: ${GREEN}${PASS}${NC}"
echo -e "Failed: ${RED}${FAIL}${NC}"
echo ""
if [ "$FAIL" -eq 0 ]; then
echo -e "${GREEN}✅ All documentation updates verified!${NC}"
exit 0
else
echo -e "${RED}❌ Some checks failed. Please review above.${NC}"
exit 1
fi