(directory: Path, filenames: List[str])
| 116 | |
| 117 | |
| 118 | def find_data_files(directory: Path, filenames: List[str]) -> Dict[str, Path]: |
| 119 | |
| 120 | found_files = {} |
| 121 | |
| 122 | def search_recursive(search_dir: Path, depth: int = 0): |
| 123 | if depth > 5: |
| 124 | return |
| 125 | |
| 126 | for item in search_dir.iterdir(): |
| 127 | if item.is_file() and item.suffix.lower() in ['.csv', '.xlsx']: |
| 128 | if item.name in filenames: |
| 129 | found_files[item.name] = item |
| 130 | elif item.is_dir() and not item.name.startswith('.'): |
| 131 | search_recursive(item, depth + 1) |
| 132 | |
| 133 | search_recursive(directory) |
| 134 | return found_files |
| 135 | |
| 136 | |
| 137 | def diagnose_task_file_issues(task_file: Path) -> Dict[str, any]: |
no test coverage detected