sda.column_whitelist ==================== .. py:module:: sda.column_whitelist .. autoapi-nested-parse:: Column whitelist for the SDA data-demon. Provides :func:`get_column_whitelist` (union of ``default_sda.json`` defaults and an optional ``~/sda.json`` override) and the one-line helper :func:`both_whitelisted` that the demon uses to skip false-positive suggestions. The canonical list of verified column names lives in ``sda/default_sda.json`` under the key ``"COLUMN_WHITELIST"``. Users can append site-specific names by adding the same key in ``~/sda.json`` — those entries are merged with the defaults (union), never replacing them. Functions --------- .. autoapisummary:: sda.column_whitelist.get_column_whitelist sda.column_whitelist.both_whitelisted Module Contents --------------- .. py:function:: get_column_whitelist(user_config_path = None) Return the union of default and user-defined whitelisted column names. :param user_config_path: Path to the user's ``sda.json``. Defaults to ``~/sda.json``. Pass a non-existent path to skip the user overlay (useful in tests). :returns: Immutable set of column name strings. Never raises — falls back to defaults only if the user config is missing or malformed. :rtype: :py:class:`frozenset[str]` .. py:function:: both_whitelisted(col_a, col_b) Return True when *col_a* and *col_b* are both verified column names. When this returns True the demon knows the pair represents two genuinely different measurements and must not suggest merging them, regardless of how high their similarity score is. :param col_a: Column names to test (exact, case-sensitive string match). :param col_b: Column names to test (exact, case-sensitive string match).