Add .tito/backups and docs/_build to gitignore

This commit is contained in:
Vijay Janapa Reddi
2025-11-28 14:59:51 +01:00
parent 76843b8f87
commit 403d4c2f4c
180 changed files with 56242 additions and 187 deletions

17
tools/README.md Normal file
View File

@@ -0,0 +1,17 @@
# Development Tools
This directory contains tools for TinyTorch maintainers and contributors.
## Structure
- **`dev/`** - Development environment setup and utilities
- **`build/`** - Build scripts for generating notebooks and metadata
- **`maintenance/`** - Maintenance and cleanup scripts
## For Students
Students don't need anything in this directory. Use the main setup scripts in the project root.
## For Developers
See `docs/development/DEVELOPER_SETUP.md` for complete developer documentation.

14
tools/dev/README.md Normal file
View File

@@ -0,0 +1,14 @@
# Development Environment Tools
Tools for setting up and maintaining the development environment.
## Scripts
- `setup.sh` - Set up development environment (was `setup-dev.sh`)
## Usage
```bash
# From project root
./tools/dev/setup.sh
```

51
tools/dev/setup.sh Executable file
View File

@@ -0,0 +1,51 @@
#!/bin/bash
# TinyTorch Development Environment Setup
# This script sets up the development environment for TinyTorch
set -e # Exit on error
echo "🔥 Setting up TinyTorch development environment..."
# Check if virtual environment exists, create if not
if [ ! -d ".venv" ]; then
echo "📦 Creating virtual environment..."
python3 -m venv .venv || {
echo "❌ Failed to create virtual environment"
exit 1
}
fi
# Activate virtual environment
echo "🔄 Activating virtual environment..."
source .venv/bin/activate
# Upgrade pip
echo "⬆️ Upgrading pip..."
pip install --upgrade pip
# Install dependencies
echo "📦 Installing dependencies..."
pip install -r requirements.txt || {
echo "⚠️ Some dependencies failed - continuing with essential packages"
}
# Install TinyTorch in development mode
echo "🔧 Installing TinyTorch in development mode..."
pip install -e . || {
echo "⚠️ Development install had issues - continuing"
}
echo "✅ Development environment setup complete!"
echo ""
echo "💡 To activate the environment in the future, run:"
echo " source .venv/bin/activate"
echo ""
echo "💡 Quick commands:"
echo " tito system health - Diagnose environment"
echo " tito module test - Run tests"
echo " tito --help - See all commands"
echo ""
echo "📋 Optional Developer Tools:"
echo " VHS (GIF generation): brew install vhs"
echo " See docs/development/DEVELOPER_SETUP.md for details"

View File

@@ -0,0 +1,15 @@
# Maintenance Tools
Scripts for repository maintenance and cleanup.
## Scripts
- `cleanup_history.sh` - Clean up repository history
- `restructure-project.sh` - This restructuring script
## Usage
```bash
# From project root
./tools/maintenance/cleanup_history.sh
```

View File

@@ -0,0 +1,119 @@
#!/bin/bash
# Repository History Cleanup Script
# Removes large files from Git history using BFG Repo-Cleaner
#
# WARNING: This rewrites Git history. Make sure you have a backup!
set -e # Exit on error
REPO_DIR="/Users/VJ/GitHub/TinyTorch"
BACKUP_DIR="${REPO_DIR}_backup_$(date +%Y%m%d_%H%M%S)"
CLEAN_REPO_DIR="${REPO_DIR}_clean"
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo -e "${YELLOW}=== TinyTorch Repository History Cleanup ===${NC}\n"
# Check if BFG is installed
if ! command -v bfg &> /dev/null; then
echo -e "${RED}ERROR: BFG Repo-Cleaner is not installed.${NC}"
echo "Install with: brew install bfg"
echo "Or download from: https://rtyley.github.io/bfg-repo-cleaner/"
exit 1
fi
# Check if we're in the right directory
if [ ! -d "$REPO_DIR/.git" ]; then
echo -e "${RED}ERROR: Not a Git repository: $REPO_DIR${NC}"
exit 1
fi
# Safety check: warn about uncommitted changes
if [ -n "$(git -C "$REPO_DIR" status --porcelain)" ]; then
echo -e "${YELLOW}WARNING: You have uncommitted changes!${NC}"
echo "Please commit or stash them before proceeding."
read -p "Continue anyway? (y/N): " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi
# Create backup
echo -e "${GREEN}Step 1: Creating backup...${NC}"
git -C "$REPO_DIR" clone --mirror "$REPO_DIR" "$BACKUP_DIR"
echo -e "${GREEN}✓ Backup created: $BACKUP_DIR${NC}\n"
# Create mirror clone for BFG
echo -e "${GREEN}Step 2: Creating mirror clone for BFG...${NC}"
rm -rf "$CLEAN_REPO_DIR"
git clone --mirror "$REPO_DIR" "$CLEAN_REPO_DIR"
echo -e "${GREEN}✓ Mirror clone created${NC}\n"
# Change to clean repo directory
cd "$CLEAN_REPO_DIR"
# Remove large files/folders
echo -e "${GREEN}Step 3: Removing large files from history...${NC}"
# Remove CIFAR-10 dataset files
echo " - Removing CIFAR-10 dataset files..."
bfg --delete-folders cifar-10-batches-py 2>&1 | grep -v "^Using.*repo" || true
# Remove virtual environment directories
echo " - Removing virtual environment directories..."
bfg --delete-folders bin 2>&1 | grep -v "^Using.*repo" || true
bfg --delete-folders lib 2>&1 | grep -v "^Using.*repo" || true
bfg --delete-folders include 2>&1 | grep -v "^Using.*repo" || true
bfg --delete-folders share 2>&1 | grep -v "^Using.*repo" || true
# Remove large GIF files (optional - comment out if you want to keep them)
echo " - Removing large GIF files..."
bfg --delete-files "*.gif" --no-blob-protection 2>&1 | grep -v "^Using.*repo" || true
# Remove large PNG files (optional - comment out if you want to keep them)
echo " - Removing large PNG files..."
bfg --delete-files "Gemini_Generated_Image_*.png" --no-blob-protection 2>&1 | grep -v "^Using.*repo" || true
# Remove pyvenv.cfg
echo " - Removing pyvenv.cfg..."
bfg --delete-files pyvenv.cfg 2>&1 | grep -v "^Using.*repo" || true
echo -e "${GREEN}✓ Files removed${NC}\n"
# Clean up Git
echo -e "${GREEN}Step 4: Cleaning up Git repository...${NC}"
git reflog expire --expire=now --all
git gc --prune=now --aggressive
echo -e "${GREEN}✓ Cleanup complete${NC}\n"
# Show results
echo -e "${GREEN}Step 5: Results${NC}"
CLEAN_SIZE=$(du -sh . | cut -f1)
echo " Clean repository size: $CLEAN_SIZE"
echo -e "\n${YELLOW}=== Next Steps ===${NC}"
echo "1. Review the cleaned repository:"
echo " cd $CLEAN_REPO_DIR"
echo " git log --oneline -10"
echo ""
echo "2. If satisfied, replace original .git:"
echo " cd $REPO_DIR"
echo " mv .git .git.backup"
echo " cp -r $CLEAN_REPO_DIR $REPO_DIR/.git"
echo ""
echo "3. Verify:"
echo " cd $REPO_DIR"
echo " git status"
echo ""
echo "4. Force push to GitHub (WARNING: rewrites history):"
echo " git push origin --force --all"
echo " git push origin --force --tags"
echo ""
echo -e "${YELLOW}Backup location: $BACKUP_DIR${NC}"
echo -e "${YELLOW}Clean repo location: $CLEAN_REPO_DIR${NC}"

View File

@@ -0,0 +1,187 @@
#!/bin/bash
# Merge backup site/ into docs/ while preserving updated documentation
set -e
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$PROJECT_ROOT"
echo "🔄 Merging site/ backup into docs/"
echo "=================================="
echo ""
# Find the backup directory
BACKUP_DIR=$(ls -dt ../TinyTorch-backup-* 2>/dev/null | head -1)
if [ -z "$BACKUP_DIR" ]; then
echo "❌ No backup directory found!"
echo " Expected: ../TinyTorch-backup-*"
exit 1
fi
echo "📦 Found backup: $BACKUP_DIR"
echo ""
if [ ! -d "$BACKUP_DIR/site" ]; then
echo "❌ Backup site/ directory not found!"
exit 1
fi
echo "📋 Copying website files from backup..."
# Copy website build files
if [ -f "$BACKUP_DIR/site/build.sh" ]; then
cp "$BACKUP_DIR/site/build.sh" docs/
chmod +x docs/build.sh
echo " ✅ build.sh"
fi
if [ -f "$BACKUP_DIR/site/_config.yml" ]; then
cp "$BACKUP_DIR/site/_config.yml" docs/
echo " ✅ _config.yml"
fi
if [ -f "$BACKUP_DIR/site/_toc.yml" ]; then
cp "$BACKUP_DIR/site/_toc.yml" docs/
echo " ✅ _toc.yml"
fi
if [ -f "$BACKUP_DIR/site/conf.py" ]; then
cp "$BACKUP_DIR/site/conf.py" docs/
echo " ✅ conf.py"
fi
if [ -f "$BACKUP_DIR/site/Makefile" ]; then
cp "$BACKUP_DIR/site/Makefile" docs/
echo " ✅ Makefile"
fi
if [ -f "$BACKUP_DIR/site/requirements.txt" ]; then
cp "$BACKUP_DIR/site/requirements.txt" docs/
echo " ✅ requirements.txt"
fi
echo ""
echo "📁 Copying website content directories..."
# Copy website content directories
if [ -d "$BACKUP_DIR/site/modules" ]; then
cp -r "$BACKUP_DIR/site/modules" docs/
echo " ✅ modules/"
fi
if [ -d "$BACKUP_DIR/site/chapters" ]; then
cp -r "$BACKUP_DIR/site/chapters" docs/
echo " ✅ chapters/"
fi
if [ -d "$BACKUP_DIR/site/tito" ]; then
cp -r "$BACKUP_DIR/site/tito" docs/
echo " ✅ tito/"
fi
if [ -d "$BACKUP_DIR/site/tiers" ]; then
cp -r "$BACKUP_DIR/site/tiers" docs/
echo " ✅ tiers/"
fi
if [ -d "$BACKUP_DIR/site/usage-paths" ]; then
cp -r "$BACKUP_DIR/site/usage-paths" docs/
echo " ✅ usage-paths/"
fi
echo ""
echo "📝 Copying website markdown files..."
# Copy top-level markdown files (website content)
WEBSITE_MD_FILES=(
"intro.md"
"getting-started.md"
"quickstart-guide.md"
"student-workflow.md"
"learning-progress.md"
"learning-journey-visual.md"
"checkpoint-system.md"
"community.md"
"datasets.md"
"faq.md"
"for-instructors.md"
"instructor-guide.md"
"prerequisites.md"
"resources.md"
"credits.md"
)
for md_file in "${WEBSITE_MD_FILES[@]}"; do
if [ -f "$BACKUP_DIR/site/$md_file" ]; then
cp "$BACKUP_DIR/site/$md_file" docs/
echo "$md_file"
fi
done
echo ""
echo "📄 Copying additional site files..."
# Copy other site-specific files
if [ -f "$BACKUP_DIR/site/prepare_notebooks.sh" ]; then
cp "$BACKUP_DIR/site/prepare_notebooks.sh" docs/
chmod +x docs/prepare_notebooks.sh
echo " ✅ prepare_notebooks.sh"
fi
if [ -f "$BACKUP_DIR/site/build_pdf.sh" ]; then
cp "$BACKUP_DIR/site/build_pdf.sh" docs/
chmod +x docs/build_pdf.sh
echo " ✅ build_pdf.sh"
fi
if [ -f "$BACKUP_DIR/site/build_pdf_simple.sh" ]; then
cp "$BACKUP_DIR/site/build_pdf_simple.sh" docs/
chmod +x docs/build_pdf_simple.sh
echo " ✅ build_pdf_simple.sh"
fi
if [ -f "$BACKUP_DIR/site/references.bib" ]; then
cp "$BACKUP_DIR/site/references.bib" docs/
echo " ✅ references.bib"
fi
if [ -f "$BACKUP_DIR/site/README.md" ]; then
cp "$BACKUP_DIR/site/README.md" docs/website-README.md
echo " ✅ README.md (as website-README.md)"
fi
if [ -f "$BACKUP_DIR/site/NAVIGATION_REDESIGN_SUMMARY.md" ]; then
cp "$BACKUP_DIR/site/NAVIGATION_REDESIGN_SUMMARY.md" docs/
echo " ✅ NAVIGATION_REDESIGN_SUMMARY.md"
fi
echo ""
echo "🖼️ Copying _static directory (preserving demos/)..."
# Copy _static but preserve our updated demos/
if [ -d "$BACKUP_DIR/site/_static" ]; then
# Copy everything except demos
for item in "$BACKUP_DIR/site/_static"/*; do
basename_item=$(basename "$item")
if [ "$basename_item" != "demos" ]; then
cp -r "$item" docs/_static/
echo " ✅ _static/$basename_item"
fi
done
fi
echo ""
echo "✅ Merge Complete!"
echo "=================="
echo ""
echo "📁 docs/ now contains:"
echo " ✅ Jupyter Book website files (from backup)"
echo " ✅ Updated docs/development/ (preserved)"
echo " ✅ Updated docs/instructor/ (preserved)"
echo " ✅ Updated docs/_static/demos/ (preserved)"
echo ""
echo "🔍 Next: Verify website builds"
echo " cd docs && ./build.sh"
echo ""

View File

@@ -0,0 +1,279 @@
#!/bin/bash
# TinyTorch Professional Restructure
# This script reorganizes the project following industry conventions
set -e # Exit on error
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
cd "$PROJECT_ROOT"
echo "🏗️ TinyTorch Professional Restructure"
echo "======================================"
echo ""
echo "This will reorganize the project structure."
echo "A backup will be created before any changes."
echo ""
# Confirm
read -p "Continue? (y/n) " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Aborted."
exit 1
fi
# Create backup
BACKUP_DIR="../TinyTorch-backup-$(date +%Y%m%d-%H%M%S)"
echo "📦 Creating backup at: $BACKUP_DIR"
cp -r . "$BACKUP_DIR"
echo "✅ Backup complete"
echo ""
# Phase 1: Create new directory structure
echo "📁 Phase 1: Creating directory structure..."
mkdir -p tools/dev
mkdir -p tools/build
mkdir -p tools/maintenance
mkdir -p docs/_static/demos/scripts
echo "✅ Directories created"
echo ""
# Phase 2: Move GIF generation scripts
echo "🎬 Phase 2: Moving GIF generation scripts..."
if [ -f "scripts/generate-demo-gifs.sh" ]; then
mv scripts/generate-demo-gifs.sh docs/_static/demos/scripts/generate.sh
echo " ✅ generate-demo-gifs.sh → docs/_static/demos/scripts/generate.sh"
fi
if [ -f "scripts/optimize-gifs.sh" ]; then
mv scripts/optimize-gifs.sh docs/_static/demos/scripts/optimize.sh
echo " ✅ optimize-gifs.sh → docs/_static/demos/scripts/optimize.sh"
fi
if [ -f "scripts/validate-gifs.sh" ]; then
mv scripts/validate-gifs.sh docs/_static/demos/scripts/validate.sh
echo " ✅ validate-gifs.sh → docs/_static/demos/scripts/validate.sh"
fi
echo ""
# Phase 3: Move developer tools
echo "🛠️ Phase 3: Moving developer tools..."
if [ -f "setup-dev.sh" ]; then
mv setup-dev.sh tools/dev/setup.sh
echo " ✅ setup-dev.sh → tools/dev/setup.sh"
fi
if [ -f "scripts/generate_student_notebooks.py" ]; then
mv scripts/generate_student_notebooks.py tools/build/generate_notebooks.py
echo " ✅ generate_student_notebooks.py → tools/build/generate_notebooks.py"
fi
if [ -f "scripts/generate_module_metadata.py" ]; then
mv scripts/generate_module_metadata.py tools/build/generate_metadata.py
echo " ✅ generate_module_metadata.py → tools/build/generate_metadata.py"
fi
if [ -f "scripts/cleanup_repo_history.sh" ]; then
mv scripts/cleanup_repo_history.sh tools/maintenance/cleanup_history.sh
echo " ✅ cleanup_repo_history.sh → tools/maintenance/cleanup_history.sh"
fi
echo ""
# Phase 4: Rename site → docs (if not already done)
echo "📚 Phase 4: Checking docs structure..."
if [ -d "site" ] && [ ! -d "docs" ]; then
echo " Renaming site/ → docs/"
mv site docs
echo " ✅ site/ → docs/"
elif [ -d "site" ] && [ -d "docs" ]; then
echo " ⚠️ Both site/ and docs/ exist. Manual merge required."
echo " Skipping automatic rename."
else
echo " ✅ docs/ already exists"
fi
echo ""
# Phase 5: Move old docs content
echo "📝 Phase 5: Organizing documentation..."
if [ -d "docs/development" ]; then
echo " ✅ docs/development/ already organized"
else
echo " ⚠️ docs/development/ not found. May need manual organization."
fi
if [ -d "instructor" ]; then
echo " Moving instructor/ → docs/instructor/"
mkdir -p docs/instructor
cp -r instructor/* docs/instructor/
echo " ✅ Instructor content moved"
fi
if [ -f "INSTRUCTOR.md" ]; then
mv INSTRUCTOR.md docs/instructor/README.md
echo " ✅ INSTRUCTOR.md → docs/instructor/README.md"
fi
if [ -f "TA_GUIDE.md" ]; then
mv TA_GUIDE.md docs/instructor/ta-guide.md
echo " ✅ TA_GUIDE.md → docs/instructor/ta-guide.md"
fi
echo ""
# Phase 6: Clean up scripts/ (keep only user-facing)
echo "🧹 Phase 6: Cleaning scripts/ directory..."
# Remove old scripts that were moved (only if they don't exist)
if [ -f "scripts/activate-tinytorch" ]; then
rm scripts/activate-tinytorch
echo " ✅ Removed old activate-tinytorch"
fi
# Keep: scripts/tito (CLI entry point)
if [ -f "scripts/tito" ]; then
echo " ✅ Kept scripts/tito (CLI entry)"
fi
echo ""
# Phase 7: Create README files for new directories
echo "📄 Phase 7: Creating README files..."
cat > tools/README.md << 'EOF'
# Development Tools
This directory contains tools for TinyTorch maintainers and contributors.
## Structure
- **`dev/`** - Development environment setup and utilities
- **`build/`** - Build scripts for generating notebooks and metadata
- **`maintenance/`** - Maintenance and cleanup scripts
## For Students
Students don't need anything in this directory. Use the main setup scripts in the project root.
## For Developers
See `docs/development/DEVELOPER_SETUP.md` for complete developer documentation.
EOF
cat > tools/dev/README.md << 'EOF'
# Development Environment Tools
Tools for setting up and maintaining the development environment.
## Scripts
- `setup.sh` - Set up development environment (was `setup-dev.sh`)
## Usage
```bash
# From project root
./tools/dev/setup.sh
```
EOF
cat > tools/build/README.md << 'EOF'
# Build Tools
Scripts for generating student-facing materials from source.
## Scripts
- `generate_notebooks.py` - Generate Jupyter notebooks from source modules
- `generate_metadata.py` - Generate module metadata
## Usage
```bash
# From project root
python tools/build/generate_notebooks.py
python tools/build/generate_metadata.py
```
EOF
cat > tools/maintenance/README.md << 'EOF'
# Maintenance Tools
Scripts for repository maintenance and cleanup.
## Scripts
- `cleanup_history.sh` - Clean up repository history
- `restructure-project.sh` - This restructuring script
## Usage
```bash
# From project root
./tools/maintenance/cleanup_history.sh
```
EOF
echo " ✅ README files created"
echo ""
# Phase 8: Update references in key files
echo "🔗 Phase 8: Updating file references..."
# Update docs/_static/demos/scripts paths
if [ -f "docs/_static/demos/scripts/generate.sh" ]; then
# Update shebang and make executable
chmod +x docs/_static/demos/scripts/generate.sh
chmod +x docs/_static/demos/scripts/optimize.sh
chmod +x docs/_static/demos/scripts/validate.sh
echo " ✅ Made GIF scripts executable"
fi
# Make tools scripts executable
if [ -f "tools/dev/setup.sh" ]; then
chmod +x tools/dev/setup.sh
echo " ✅ Made tools/dev/setup.sh executable"
fi
if [ -f "tools/maintenance/cleanup_history.sh" ]; then
chmod +x tools/maintenance/cleanup_history.sh
echo " ✅ Made tools/maintenance/cleanup_history.sh executable"
fi
echo ""
# Summary
echo "✅ Restructure Complete!"
echo "======================"
echo ""
echo "📁 New Structure:"
echo " ├── tools/ # Developer tools"
echo " │ ├── dev/ # Development utilities"
echo " │ ├── build/ # Build scripts"
echo " │ └── maintenance/ # Maintenance scripts"
echo " ├── docs/ # All documentation + website"
echo " │ ├── _static/demos/scripts/ # GIF generation"
echo " │ ├── development/ # Developer guides"
echo " │ └── instructor/ # Instructor guides"
echo " └── scripts/ # User-facing only"
echo " └── tito # CLI entry"
echo ""
echo "📦 Backup saved at: $BACKUP_DIR"
echo ""
echo "🔍 Next Steps:"
echo " 1. Test website build: cd docs && ./build.sh"
echo " 2. Test TITO commands: tito --help"
echo " 3. Update documentation references"
echo " 4. Commit changes: git add -A && git commit -m 'refactor: professional project structure'"
echo ""

View File

@@ -0,0 +1,157 @@
#!/bin/bash
# Verify TinyTorch structure after reorganization
# Tests that all critical functionality still works
set -e
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$PROJECT_ROOT"
echo "🔍 TinyTorch Structure Verification"
echo "===================================="
echo ""
FAILED=0
# Test 1: Check directory structure
echo "📁 Test 1: Verifying directory structure..."
REQUIRED_DIRS=(
"tools/dev"
"tools/build"
"tools/maintenance"
"docs/_static/demos/scripts"
"docs/development"
"tito"
"tinytorch"
"src"
"tests"
)
for dir in "${REQUIRED_DIRS[@]}"; do
if [ -d "$dir" ]; then
echo "$dir"
else
echo "$dir - MISSING"
FAILED=$((FAILED + 1))
fi
done
echo ""
# Test 2: Check critical files
echo "📄 Test 2: Verifying critical files..."
CRITICAL_FILES=(
"README.md"
"requirements.txt"
"setup-environment.sh"
"activate.sh"
"tools/dev/setup.sh"
"docs/_static/demos/scripts/generate.sh"
"docs/_static/demos/scripts/optimize.sh"
"docs/_static/demos/scripts/validate.sh"
)
for file in "${CRITICAL_FILES[@]}"; do
if [ -f "$file" ]; then
echo "$file"
else
echo "$file - MISSING"
FAILED=$((FAILED + 1))
fi
done
echo ""
# Test 3: Check TITO CLI
echo "🚀 Test 3: Testing TITO CLI..."
if command -v tito &> /dev/null; then
echo " ✅ tito command available"
# Test basic commands
if tito --help &> /dev/null; then
echo " ✅ tito --help works"
else
echo " ❌ tito --help failed"
FAILED=$((FAILED + 1))
fi
if tito --version &> /dev/null; then
echo " ✅ tito --version works"
else
echo " ⚠️ tito --version failed (may be expected)"
fi
else
echo " ❌ tito command not found"
echo " Try: source activate.sh"
FAILED=$((FAILED + 1))
fi
echo ""
# Test 4: Check Python imports
echo "🐍 Test 4: Testing Python imports..."
if python3 -c "import tinytorch" 2>/dev/null; then
echo " ✅ import tinytorch works"
else
echo " ❌ import tinytorch failed"
FAILED=$((FAILED + 1))
fi
if python3 -c "import tito" 2>/dev/null; then
echo " ✅ import tito works"
else
echo " ❌ import tito failed"
FAILED=$((FAILED + 1))
fi
echo ""
# Test 5: Check GIF generation setup
echo "🎬 Test 5: Checking GIF generation..."
if [ -d "docs/_static/demos/tapes" ]; then
echo " ✅ VHS tapes directory exists"
tape_count=$(ls docs/_static/demos/tapes/*.tape 2>/dev/null | wc -l)
echo " ✅ Found $tape_count VHS tape files"
else
echo " ❌ VHS tapes directory missing"
FAILED=$((FAILED + 1))
fi
if command -v vhs &> /dev/null; then
echo " ✅ VHS installed"
else
echo " ⚠️ VHS not installed (optional for maintainers)"
fi
echo ""
# Test 6: Check documentation structure
echo "📚 Test 6: Checking documentation..."
DOC_DIRS=(
"docs/development"
"docs/instructor"
"docs/_static"
)
for dir in "${DOC_DIRS[@]}"; do
if [ -d "$dir" ]; then
echo "$dir"
else
echo "$dir - MISSING"
FAILED=$((FAILED + 1))
fi
done
echo ""
# Summary
echo "================================"
if [ $FAILED -eq 0 ]; then
echo "✅ All verification tests passed!"
echo ""
echo "Next steps:"
echo " 1. Test website build: cd docs && ./build.sh"
echo " 2. Test module workflow: tito module status"
echo " 3. Run test suite: pytest tests/"
exit 0
else
echo "$FAILED test(s) failed"
echo ""
echo "Some issues detected. Please review the output above."
exit 1
fi