INNER CODE UNIT · Python

_extract_and_process_files

Future-House/BixBench · bixbench/generate_trajectories.py:155

    def _extract_and_process_files(self, zip_path: Path, extract_dir: Path) -> None:
        """
        Extract and process zip files for a capsule.

        Args:
            zip_path: Path to the zip file
            extract_dir: Directory to extract files to
        """
        # Extract the zip file
        shutil.unpack_archive(zip_path, extract_dir)

        # Get the Data folder path
        data_folder = next(
            (p for p in extract_dir.rglob("*") if p.is_dir() and "Data" in p.name), None
        )
        if data_folder is None:
            raise FileNotFoundError(
                "Could not find a directory containing 'Data' in its name"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…