ibl_alignment_gui.utils.optional

Helpers for querying optional dependencies.

Some features rely on optional dependency stacks installed via extras: ibllib (the ibl extra, for the online ONE/Alyx mode) and the aind/boto3 stack (the allen extra, for the Allen/Code Ocean DocDB mode). The helpers here report whether those stacks are installed (without importing them) so the launchers can fail fast with an actionable message; the modules that use them import them lazily at the point of use.

Functions

has_allen

Return whether the Allen (DocDB) dependency stack is importable.

has_ibllib

Return whether the IBL (ibllib) dependency stack is importable.

ibl_alignment_gui.utils.optional.has_allen()[source]

Return whether the Allen (DocDB) dependency stack is importable.

Uses importlib.util.find_spec so the check does not import the heavy dependencies.

Returns:

True if aind_data_access_api is installed, False otherwise.

Return type:

bool

ibl_alignment_gui.utils.optional.has_ibllib()[source]

Return whether the IBL (ibllib) dependency stack is importable.

Uses importlib.util.find_spec so the check does not import the heavy dependencies.

Returns:

True if ibllib is installed, False otherwise.

Return type:

bool