def main()

in projects/unit3/github-actions-integration/starter/validate_starter.py [0:0]


def main():
    """Run all validation checks."""
    print("Module 1 Starter Code Validation")
    print("=" * 50)
    
    # Change to starter directory if needed
    if Path("validate_starter.py").exists():
        os.chdir(Path("validate_starter.py").parent)
    
    tests = [
        ("Project Structure", test_project_structure),
        ("Python Imports", test_imports),
        ("TODO Comments", test_todos),
        ("Starter Execution", test_starter_runs),
        ("Dependencies", test_dependencies),
        ("Clean Starter", test_no_implementation)
    ]
    
    results = []
    for test_name, test_func in tests:
        print(f"\n{test_name}:")
        try:
            results.append(test_func())
        except Exception as e:
            print(f"āœ— Test failed with error: {e}")
            results.append(False)
    
    print("\n" + "=" * 50)
    passed = sum(results)
    total = len(results)
    print(f"Checks passed: {passed}/{total}")
    
    if passed == total:
        print("\nāœ“ Starter code is ready for learners!")
        print("\nLearners should:")
        print("1. Run: uv sync")
        print("2. Follow the TODO comments in server.py")
        print("3. Test with: uv run pytest test_server.py")
        print("4. Configure Claude Desktop when ready")
    else:
        print("\nāœ— Some checks failed. Please review the starter code.")
        sys.exit(1)