validate_directory_as_bids#
- petpal.utils.bids_utils.validate_directory_as_bids(project_path: str) bool#
Validate whether all files in a given directory and its subdirectories (excluding specified ones) conform to the Brain Imaging Data Structure (BIDS) standard.
- Parameters:
project_path (str) – The root directory of the project to validate.
- Returns:
bool – True if all files in the directory conform to the BIDS standard, False if any do not.
- Raises:
FileNotFoundError – If the provided project_path does not exist or is inaccessible.
Notes
Excludes directories typically not needed for BIDS validation, such as ‘code’, ‘derivatives’, ‘sourcedata’, ‘.git’, and ‘stimuli’. Also skips directories starting with ‘sub-’ to focus on top-level structure.