def test_dependencies()

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


def test_dependencies():
    """Check that pyproject.toml is properly configured."""
    print("\nDependencies:")
    
    try:
        import tomllib
    except ImportError:
        import tomli as tomllib
    
    try:
        with open("pyproject.toml", "rb") as f:
            config = tomllib.load(f)
        
        # Check for required sections
        if "project" in config and "dependencies" in config["project"]:
            deps = config["project"]["dependencies"]
            print(f"✓ Found {len(deps)} dependencies")
            for dep in deps:
                print(f"  - {dep}")
        else:
            print("✗ No dependencies section found")
            return False
            
        return True
    except Exception as e:
        print(f"✗ Error reading pyproject.toml: {e}")
        return False