src/dirbs/importer/operator_data_importer.py
def _check_non_home_network_imsi_ratio(self):
        """Check whether the percentage of IMSIs with an invalid home check is less than our configured threshold."""
        with self._conn.cursor() as cursor:
            cursor.execute(sql.SQL("""SELECT COUNT(*)
                                        FROM {0}
                                       WHERE fails_prefix_check(imsi_norm, %s)""")
                           .format(self._staging_tbl_identifier),
                           [self._mcc_mnc_str])
            failing_check = cursor.fetchone()[0]
            ratio = failing_check / self._data_length
            threshold = self._non_home_network_threshold
            return 'non-home network IMSI data', ratio <= threshold, ratio, threshold, 'non_home_imsi'
Check whether the percentage of IMSIs with an invalid home check is less than our configured threshold.
Check whether the percentage of IMSIs with an invalid home check is less than our configured threshold.
Check whether the percentage of IMSIs with an invalid home check is less than our configured threshold .
def _check_non_home_network_imsi_ratio(self):
        with self._conn.cursor() as cursor:
            cursor.execute(sql.SQL("""SELECT COUNT(*)
                                        FROM {0}
                                       WHERE fails_prefix_check(imsi_norm, %s)""")
                           .format(self._staging_tbl_identifier),
                           [self._mcc_mnc_str])
            failing_check = cursor.fetchone()[0]
            ratio = failing_check / self._data_length
            threshold = self._non_home_network_threshold
            return 'non-home network IMSI data', ratio <= threshold, ratio, threshold, 'non_home_imsi'
def _check_non_home_network_imsi_ratio ( self ) : with self . _conn . cursor ( ) as cursor : cursor . execute ( sql . SQL ( """SELECT COUNT(*)
                                        FROM {0}
                                       WHERE fails_prefix_check(imsi_norm, %s)""" ) . format ( self . _staging_tbl_identifier ) , [ self . _mcc_mnc_str ] ) failing_check = cursor . fetchone ( ) [ 0 ] ratio = failing_check / self . _data_length threshold = self . _non_home_network_threshold return 'non-home network IMSI data' , ratio <= threshold , ratio , threshold , 'non_home_imsi'
Check whether the percentage of IMSIs with an invalid home check is less than our configured threshold.
Check whether the percentage of IMSIs with an invalid home check is less than our configured threshold .
"""Check whether the percentage of IMSIs with an invalid home check is less than our configured threshold."""
self