ComponentInfo#
- class brainglobe_atlasapi.atlas_generation.atlas_packaging_data.ComponentInfo(name: str, version: str, use_existing: bool = False, update_existing: bool = False, existing_version: str | None = None, root_dir: str | None = None, file_name: str | None = None, existing_stub: str | None = None, stub: str | None = None, metadata: dict = <factory>)[source]#
Bases:
objectContainer for information about a component of a BrainGlobe atlas (e.g., template, annotation).
This dataclass holds information about a specific component of a BrainGlobe atlas, such as a template or annotation. It includes fields for the component’s name, version, and metadata, as well as flags for whether to use an existing component or update an existing component.
- name#
The name of the component (e.g., “allen-adult-mouse-stpt-template”).
- Type:
str
- version#
The version of the component (e.g., “0.1.0”).
- Type:
str
- use_existing#
Whether to use the existing component from with the same name and version from the remote (default is False).
- Type:
bool, optional
- update_existing#
Whether to update an existing component with the same name and version (default is False).
- Type:
bool, optional
- existing_version#
The version of the existing component to update (required if update_existing is True).
- Type:
str, optional
- root_dir#
The root directory for the component (e.g., “templates”).
- Type:
str, optional
- file_name#
The name of the component file (e.g., “anatomical_template.ome.zarr”).
- Type:
str, optional
- existing_stub#
The remote stub for the existing component (automatically generated if update_existing is True).
- Type:
str, optional
- stub#
The remote stub for the component (automatically generated if not provided).
- Type:
str, optional
- metadata#
A dictionary to hold the component metadata (automatically generated in __post_init__).
- Type:
dict, optional
Methods
Generate a dictionary containing metadata for this component.
Attributes