Generate a short hash from the project path for unique naming. Args: project_root: Path to the project root Returns: 8-character hex hash of the path
(project_root: Path)
| 42 | |
| 43 | |
| 44 | def _get_path_hash(project_root: Path) -> str: |
| 45 | """Generate a short hash from the project path for unique naming. |
| 46 | |
| 47 | Args: |
| 48 | project_root: Path to the project root |
| 49 | |
| 50 | Returns: |
| 51 | 8-character hex hash of the path |
| 52 | """ |
| 53 | # Normalize path (resolve symlinks, convert to absolute) |
| 54 | normalized_path = str(project_root.resolve()).lower() |
| 55 | # Use SHA256 and take first 8 characters |
| 56 | return hashlib.sha256(normalized_path.encode()).hexdigest()[:8] |
| 57 | |
| 58 | |
| 59 | def _get_container_name(project_root: Path) -> str: |
no test coverage detected