check_requested_component#
- brainglobe_atlasapi.atlas_generation.atlas_packaging_data.check_requested_component(component_info: ComponentInfo, working_dir: Path)[source]#
Check if a requested component already exists remotely and fetch it.
If the component is set to use_existing, will check if it exists remotely and fetch all metadata files locally. If the component is set to update_existing, will check if the existing version exists remotely and fetch all data and metadata files locally.
- Parameters:
component_info (ComponentInfo) – A dataclass containing the component name, version, and a booleans for whether the component is published and whether to update existing.
working_dir (Path) – The local working directory where the component data should be saved if it exists remotely.
- Raises:
ValueError – If update_existing is True but existing_version is not provided.
FileNotFoundError – If the requested component or existing version is not found remotely.