ClusteringController¶
class ClusteringController(available_subclasses: Optional[Mapping[str, List[str]]] = None, **kwargs)
Bases: MetaController
Subclass of MetaController for managing clustering view-model logic.
Handles queries, data relaying, and view updates.
Public Methods¶
- ClusteringController.alter_database_status(status: bool) None¶
Inform the view whether database alteration was successful.
- Parameters:
status (bool) – Result of the database alteration operation.
- ClusteringController.check_cluster_column_exists(table_name: str) None¶
Notify the view to check if a cluster column exists in the given table.
- Parameters:
table_name (str) – Name of the table to check.
- ClusteringController.display_write_status(status: bool) None¶
Notify the display panel whether clustering data was successfully written to the database.
- Parameters:
status (bool) – True if the write succeeded, False otherwise.
- ClusteringController.relay_event_data_generator(generator: Generator) None¶
Send an event data generator object to the view for processing.
- Parameters:
generator (Generator) – Generator yielding event data entries.
- ClusteringController.relay_plot_data(data: Any) None¶
Relay processed clustering data to the view for plotting.
- Parameters:
data (Any) – Data structure containing plot information.
- ClusteringController.relay_query(query: str, debug: str, table_name: str) None¶
Relay the SQL query and target table to the view for display or execution.
- ClusteringController.relay_units(units: Dict[str, str | None]) None¶
Provide units associated with each column to the view.
- ClusteringController.update_column_names(column_names: List[str]) None¶
Update the view with a new list of column names from the database.
- Parameters:
column_names (List[str]) – List of column names to populate axis selection.
- ClusteringController.update_column_units(column_units: str | None, axis: str) None¶
Update unit labels for a given axis in the view.
Despite the parameter names, this is a
get_column_unitscallback: it receives the unit string for a single column (Noneif the loader has none) followed by that column’s name.