src/dirbs/cli/report.py
def gsma_not_found(ctx: callable, config: callable, statsd: callable, logger: callable, run_id: int, conn: callable,
                   metadata_conn: callable, command: str, metrics_root: callable, metrics_run_root: callable,
                   force_refresh: bool, disable_retention_check: bool, disable_data_check: bool,
                   debug_query_performance: bool, month: int, year: int, output_dir: str) -> None:
    """Generate report of all GSMA not found IMEIs.

    Arguments:
        ctx: click context object
        config: DIRBS config object
        statsd: DIRBS statsd connection object
        logger: DIRBS custom logger object
        run_id: run id of the current job
        conn: DIRBS PostgreSQL connection object
        metadata_conn: DIRBS PostgreSQL metadata connection object
        command: name of the command
        metrics_root: root object for the statsd metrics
        metrics_run_root: root object for the statsd run metrics
        force_refresh: bool to force writing/generating reports from scratch
        disable_retention_check: bool to disable data retention check
        disable_data_check: bool to disable data check
        debug_query_performance: bool to debug query performance
        month: reporting month
        year: reporting year
        output_dir: output directory path
    Returns:
        None
    """
    reports_validation_checks(disable_retention_check, year, month, logger, config, conn,
                              disable_data_check)
    metadata.add_optional_job_metadata(metadata_conn, command, run_id,
                                       refreshed_data=force_refresh,
                                       month=month,
                                       year=year,
                                       report_schema_version=report_schema_version,
                                       output_dir=os.path.abspath(str(output_dir)))
    report_dir = make_report_directory(ctx, output_dir, run_id, conn, config, year=year, month=month)

    report_metadata = []

    with utils.CodeProfiler() as cp:
        logger.info('Generating country GSMA not found report...')
        country_name = config.region_config.name
        report_metadata.extend(write_country_gsma_not_found_report(conn, config, month,
                                                                   year, country_name, report_dir))
    statsd.gauge('{0}runtime.per_report.gsma_not_found'.format(metrics_run_root), cp.duration)

    # Store metadata about the report data ID and classification run ID
    metadata.add_optional_job_metadata(metadata_conn, command, run_id, report_outputs=report_metadata)
Generate report of all GSMA not found IMEIs.

    Arguments:
        ctx: click context object
        config: DIRBS config object
        statsd: DIRBS statsd connection object
        logger: DIRBS custom logger object
        run_id: run id of the current job
        conn: DIRBS PostgreSQL connection object
        metadata_conn: DIRBS PostgreSQL metadata connection object
        command: name of the command
        metrics_root: root object for the statsd metrics
        metrics_run_root: root object for the statsd run metrics
        force_refresh: bool to force writing/generating reports from scratch
        disable_retention_check: bool to disable data retention check
        disable_data_check: bool to disable data check
        debug_query_performance: bool to debug query performance
        month: reporting month
        year: reporting year
        output_dir: output directory path
    Returns:
        None
    
Generate report of all GSMA not found IMEIs.
Generate report of all GSMA not found IMEIs .
def gsma_not_found(ctx: callable, config: callable, statsd: callable, logger: callable, run_id: int, conn: callable,
                   metadata_conn: callable, command: str, metrics_root: callable, metrics_run_root: callable,
                   force_refresh: bool, disable_retention_check: bool, disable_data_check: bool,
                   debug_query_performance: bool, month: int, year: int, output_dir: str) -> None:
    reports_validation_checks(disable_retention_check, year, month, logger, config, conn,
                              disable_data_check)
    metadata.add_optional_job_metadata(metadata_conn, command, run_id,
                                       refreshed_data=force_refresh,
                                       month=month,
                                       year=year,
                                       report_schema_version=report_schema_version,
                                       output_dir=os.path.abspath(str(output_dir)))
    report_dir = make_report_directory(ctx, output_dir, run_id, conn, config, year=year, month=month)
    report_metadata = []
    with utils.CodeProfiler() as cp:
        logger.info('Generating country GSMA not found report...')
        country_name = config.region_config.name
        report_metadata.extend(write_country_gsma_not_found_report(conn, config, month,
                                                                   year, country_name, report_dir))
    statsd.gauge('{0}runtime.per_report.gsma_not_found'.format(metrics_run_root), cp.duration)
    metadata.add_optional_job_metadata(metadata_conn, command, run_id, report_outputs=report_metadata)
def gsma_not_found ( ctx : callable , config : callable , statsd : callable , logger : callable , run_id : int , conn : callable , metadata_conn : callable , command : str , metrics_root : callable , metrics_run_root : callable , force_refresh : bool , disable_retention_check : bool , disable_data_check : bool , debug_query_performance : bool , month : int , year : int , output_dir : str ) -> None : reports_validation_checks ( disable_retention_check , year , month , logger , config , conn , disable_data_check ) metadata . add_optional_job_metadata ( metadata_conn , command , run_id , refreshed_data = force_refresh , month = month , year = year , report_schema_version = report_schema_version , output_dir = os . path . abspath ( str ( output_dir ) ) ) report_dir = make_report_directory ( ctx , output_dir , run_id , conn , config , year = year , month = month ) report_metadata = [ ] with utils . CodeProfiler ( ) as cp : logger . info ( 'Generating country GSMA not found report...' ) country_name = config . region_config . name report_metadata . extend ( write_country_gsma_not_found_report ( conn , config , month , year , country_name , report_dir ) ) statsd . gauge ( '{0}runtime.per_report.gsma_not_found' . format ( metrics_run_root ) , cp . duration ) metadata . add_optional_job_metadata ( metadata_conn , command , run_id , report_outputs = report_metadata )
Generate report of all GSMA not found IMEIs.
Generate report of all GSMA not found IMEIs .
"""Generate report of all GSMA not found IMEIs.

    Arguments:
        ctx: click context object
        config: DIRBS config object
        statsd: DIRBS statsd connection object
        logger: DIRBS custom logger object
        run_id: run id of the current job
        conn: DIRBS PostgreSQL connection object
        metadata_conn: DIRBS PostgreSQL metadata connection object
        command: name of the command
        metrics_root: root object for the statsd metrics
        metrics_run_root: root object for the statsd run metrics
        force_refresh: bool to force writing/generating reports from scratch
        disable_retention_check: bool to disable data retention check
        disable_data_check: bool to disable data check
        debug_query_performance: bool to debug query performance
        month: reporting month
        year: reporting year
        output_dir: output directory path
    Returns:
        None
    """ # Store metadata about the report data ID and classification run ID
None
ctx
callable
click context object
click context object
config
callable
DIRBS config object
DIRBS config object
statsd
callable
DIRBS statsd connection object
DIRBS statsd connection object
logger
callable
DIRBS custom logger object
DIRBS custom logger object
run_id
int
run id of the current job
run id of the current job
conn
callable
DIRBS PostgreSQL connection object
DIRBS PostgreSQL connection object
metadata_conn
callable
DIRBS PostgreSQL metadata connection object
DIRBS PostgreSQL metadata connection object
command
str
name of the command
name of the command
metrics_root
callable
root object for the statsd metrics
root object for the statsd metrics
metrics_run_root
callable
root object for the statsd run metrics
root object for the statsd run metrics
force_refresh
bool
bool to force writing/generating reports from scratch
bool to force writing / generating reports from scratch
disable_retention_check
bool
bool to disable data retention check
bool to disable data retention check
disable_data_check
bool
bool to disable data check
bool to disable data check
debug_query_performance
bool
bool to debug query performance
bool to debug query performance
month
int
None
year
int
None
output_dir
str
output directory path
output directory path