def render_process_signatures_progress():
    exclude = {'datadog_checks_base', 'datadog_checks_dev', 'datadog_checks_downloader', 'snowflake'}
    valid_checks = sorted([c for c in get_valid_checks() if c not in exclude])
    total_checks = len(valid_checks)
    checks_with_ps = 0

    lines = ['## Process signatures', '', None, '', '??? check "Completed"']
    for check in valid_checks:
        if has_process_signature(check):
            status = 'X'
            checks_with_ps += 1
        else:
            status = ' '
        lines.append(f'    - [{status}] {check}')

    percent = checks_with_ps / total_checks * 100
    formatted_percent = f'{percent:.2f}'
    lines[2] = f'[={formatted_percent}% "{formatted_percent}%"]'
    return lines
Esempio n. 2
0
def render_process_signatures_progress():
    valid_checks = sorted(
        [c for c in get_valid_checks() if c not in PROCESS_SIGNATURE_EXCLUDE])
    total_checks = len(valid_checks)
    checks_with_ps = 0

    lines = ['## Process signatures', '', None, '', '??? check "Completed"']
    for check in valid_checks:
        if has_process_signature(check):
            status = 'X'
            checks_with_ps += 1
        else:
            status = ' '
        lines.append(f'    - [{status}] {check}')

    percent = checks_with_ps / total_checks * 100
    formatted_percent = f'{percent:.2f}'
    lines[2] = f'[={formatted_percent}% "{formatted_percent}%"]'
    lines[4] = f'??? check "Completed {checks_with_ps}/{total_checks}"'
    return lines