Some checks failed
Coverage Phase 1 (70% Target) / test-coverage-70 (push) Has been cancelled
Coverage Phase 2 (85% Target) / test-coverage-85 (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Documentation Validation / validate-docs (push) Has been cancelled
Documentation Validation / validate-policies-strict (push) Has been cancelled
CLI Tests / test-cli (push) Has been cancelled
Package Tests / Python package - aitbc-agent-sdk (push) Has been cancelled
Package Tests / Python package - aitbc-core (push) Has been cancelled
Package Tests / Python package - aitbc-crypto (push) Has been cancelled
Package Tests / Python package - aitbc-sdk (push) Has been cancelled
Package Tests / JavaScript package - aitbc-sdk-js (push) Has been cancelled
Package Tests / JavaScript package - aitbc-token (push) Has been cancelled
Smart Contract Tests / test-solidity (map[name:aitbc-contracts path:contracts]) (push) Has been cancelled
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Has been cancelled
Smart Contract Tests / test-foundry (push) Has been cancelled
Smart Contract Tests / lint-solidity (push) Has been cancelled
Smart Contract Tests / deploy-contracts (push) Has been cancelled
- Updated CI workflows to track poetry.lock instead of requirements.txt - Removed check-requirements-sync.py step from python-tests.yml - Updated dependency_scanner.py default from requirements.txt to pyproject.toml - Replaced all print() with click.echo() in deploy_edge_node.py (CLI script) - Replaced print() with logger.warning() in zk_cache.py - Updated setup.py files to read dependencies from pyproject.toml via tomli - Removed
151 lines
5.0 KiB
Bash
Executable File
151 lines
5.0 KiB
Bash
Executable File
#!/bin/bash
|
|
# File: /home/oib/windsurf/aitbc/scripts/check-documentation-requirements.sh
|
|
|
|
set -e
|
|
|
|
# Colors for output
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m' # No Color
|
|
|
|
echo "🔍 Checking Documentation for Requirement Consistency"
|
|
echo "=================================================="
|
|
|
|
ISSUES_FOUND=false
|
|
|
|
# Function to check Python version in documentation
|
|
check_python_docs() {
|
|
echo -e "\n📋 Checking Python version documentation..."
|
|
|
|
# Find all markdown files
|
|
find docs/ -name "*.md" -type f | while read -r file; do
|
|
# Check for incorrect Python versions
|
|
if grep -q "python.*3\.[0-9][0-9]" "$file"; then
|
|
echo -e "${YELLOW}⚠️ $file: Contains Python version references${NC}"
|
|
grep -n "python.*3\.[0-9][0-9]" "$file" | head -3
|
|
fi
|
|
|
|
# Check for correct Python 3.13.5 requirement
|
|
if grep -q "3\.13\.5" "$file"; then
|
|
echo -e "${GREEN}✅ $file: Contains Python 3.13.5 requirement${NC}"
|
|
fi
|
|
done
|
|
}
|
|
|
|
# Function to check system requirements documentation
|
|
check_system_docs() {
|
|
echo -e "\n📋 Checking system requirements documentation..."
|
|
|
|
# Check main deployment guide
|
|
if [ -f "docs/10_plan/aitbc.md" ]; then
|
|
echo "Checking aitbc.md..."
|
|
|
|
# Check Python version
|
|
if grep -q "3\.13\.5.*minimum.*requirement" docs/10_plan/aitbc.md; then
|
|
echo -e "${GREEN}✅ Python 3.13.5 minimum requirement documented${NC}"
|
|
else
|
|
echo -e "${RED}❌ Python 3.13.5 minimum requirement missing or incorrect${NC}"
|
|
ISSUES_FOUND=true
|
|
fi
|
|
|
|
# Check system requirements
|
|
if grep -q "8GB.*RAM.*minimum" docs/10_plan/aitbc.md; then
|
|
echo -e "${GREEN}✅ Memory requirement documented${NC}"
|
|
else
|
|
echo -e "${RED}❌ Memory requirement missing or incorrect${NC}"
|
|
ISSUES_FOUND=true
|
|
fi
|
|
|
|
# Check storage requirement
|
|
if grep -q "50GB.*available.*space" docs/10_plan/aitbc.md; then
|
|
echo -e "${GREEN}✅ Storage requirement documented${NC}"
|
|
else
|
|
echo -e "${RED}❌ Storage requirement missing or incorrect${NC}"
|
|
ISSUES_FOUND=true
|
|
fi
|
|
else
|
|
echo -e "${RED}❌ Main deployment guide (aitbc.md) not found${NC}"
|
|
ISSUES_FOUND=true
|
|
fi
|
|
}
|
|
|
|
# Function to check service files for Python version checks
|
|
check_service_files() {
|
|
echo -e "\n📋 Checking service files for Python version validation..."
|
|
|
|
if [ -d "systemd" ]; then
|
|
find systemd/ -name "*.service" -type f | while read -r file; do
|
|
if grep -q "python.*version" "$file"; then
|
|
echo -e "${GREEN}✅ $file: Contains Python version check${NC}"
|
|
else
|
|
echo -e "${YELLOW}⚠️ $file: Missing Python version check${NC}"
|
|
fi
|
|
done
|
|
fi
|
|
}
|
|
|
|
# Function to check dependency files
|
|
check_requirements_files() {
|
|
echo -e "\n📋 Checking dependency files..."
|
|
|
|
# Check pyproject.toml (Poetry source of truth)
|
|
if [ -f "pyproject.toml" ]; then
|
|
echo "Checking pyproject.toml..."
|
|
|
|
# Check for Python version specification
|
|
if grep -q "python = " pyproject.toml; then
|
|
echo -e "${GREEN}✅ Python version requirement specified in pyproject.toml${NC}"
|
|
else
|
|
echo -e "${YELLOW}⚠️ Python version requirement not specified in pyproject.toml${NC}"
|
|
fi
|
|
|
|
# Check for Python 3.13+ requirement
|
|
if grep -q "requires-python.*3\.13" pyproject.toml; then
|
|
echo -e "${GREEN}✅ Python 3.13+ requirement in pyproject.toml${NC}"
|
|
else
|
|
echo -e "${YELLOW}⚠️ Python 3.13+ requirement missing in pyproject.toml${NC}"
|
|
fi
|
|
else
|
|
echo -e "${RED}❌ pyproject.toml not found${NC}"
|
|
fi
|
|
}
|
|
|
|
# Function to check for hardcoded versions in code
|
|
check_hardcoded_versions() {
|
|
echo -e "\n📋 Checking for hardcoded versions in code..."
|
|
|
|
# Find Python files with version checks
|
|
find apps/ -name "*.py" -type f -exec grep -l "sys.version_info" {} \; | while read -r file; do
|
|
echo -e "${GREEN}✅ $file: Contains version check${NC}"
|
|
|
|
# Check if version is correct
|
|
if grep -q "3.*13.*5" "$file"; then
|
|
echo -e "${GREEN} ✅ Correct version requirement (3.13.5)${NC}"
|
|
else
|
|
echo -e "${YELLOW} ⚠️ May have incorrect version requirement${NC}"
|
|
fi
|
|
done
|
|
}
|
|
|
|
# Run all checks
|
|
check_python_docs
|
|
check_system_docs
|
|
check_service_files
|
|
check_requirements_files
|
|
check_hardcoded_versions
|
|
|
|
# Summary
|
|
echo -e "\n📊 Documentation Check Summary"
|
|
echo "============================="
|
|
|
|
if [ "$ISSUES_FOUND" = true ]; then
|
|
echo -e "${RED}❌ Issues found in documentation requirements${NC}"
|
|
echo -e "${RED}Please fix the above issues before deployment${NC}"
|
|
exit 1
|
|
else
|
|
echo -e "${GREEN}✅ Documentation requirements are consistent${NC}"
|
|
echo -e "${GREEN}Ready for deployment!${NC}"
|
|
exit 0
|
|
fi
|