Files
StarPilot/tools/vendor/check.py
T
firestar5683 694b460f80 Developer Tools
Provide laptop and device build entry points, cache compatibility checks and developer tooling. Keep distribution assets and model packaging available before runtime consumers.

Co-authored-by: Danny <dannyirwin31@yahoo.com>
Co-authored-by: Prabhaav Pillai <prabhaav@msu.edu>
Co-authored-by: dirwin31 <83434411+dirwin31@users.noreply.github.com>
Co-authored-by: firestarsdog <229254897+firestarsdog@users.noreply.github.com>

Co-authored-by: prabhaavp <prabhaav@msu.edu>
2026-10-14 20:02:39 -05:00

30 lines
957 B
Python
Executable File

#!/usr/bin/env python3
"""Check tracked dependency folders, locally or at a fetched revision."""
import argparse
import subprocess
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
sys.path.insert(0, str(ROOT))
from openpilot.common.vendor_manifest import dependency_entries, validate_revision, validate_worktree
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--revision", help="Validate a committed revision instead of the working tree")
args = parser.parse_args()
try:
manifest = validate_revision(ROOT, args.revision) if args.revision else validate_worktree(ROOT)
except (ValueError, OSError, subprocess.CalledProcessError) as e:
print(f"Source validation failed: {e}", file=sys.stderr)
return 1
print(f"Source layout valid: {len(dependency_entries(manifest))} tracked dependency folders")
return 0
if __name__ == "__main__":
sys.exit(main())