Skip to content

File Sort

Module: spectralbridge.file_sort.

Direct-module reference; consult the linked workflow for processing context.

API glossary ยท Workflow / scientific context

Signatures and documentation below are collected from the current source. Advanced objects are not newly declared stable by inclusion here.

Audience: advanced.

categorize_file

categorize_file(file_obj: DataFile) -> str

Return the destination category name for file_obj.

Audience: advanced.

generate_file_move_list

generate_file_move_list(base_folder: str, destination_folder: str, remote_path_prefix: str = '') -> pd.DataFrame

Scans base_folder recursively to find all files matching the defined file types and generates a move list with local and iRODS paths.

Parameters: - base_folder: The path to the base directory to scan - destination_folder: The path to the destination folder for sorted files - remote_path_prefix: Optional custom path to add after i:/iplant/ for remote paths

Returns: - DataFrame with columns ['Source Path', 'Destination Path'] where Source Path is local and Destination Path is the iRODS remote path