From 13a0303f568bc609ddd87081749618ef804f692e Mon Sep 17 00:00:00 2001 From: yatarkan Date: Mon, 23 Dec 2024 20:27:13 +0400 Subject: [PATCH] Enable checking telemetry snippet in ci --- .ci/check_notebooks.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.ci/check_notebooks.py b/.ci/check_notebooks.py index 599da23f1a6..5f9070153cd 100644 --- a/.ci/check_notebooks.py +++ b/.ci/check_notebooks.py @@ -4,6 +4,7 @@ from patch_notebooks import DEVICE_WIDGET, DEVICE_WIDGET_NEW from install_instructions import check_install_instructions from scarf_pixel import check_scarf_tag +from telemetry_snippet import check_telemetry_snippet from pathlib import Path NOTEBOOKS_ROOT = Path(__file__).resolve().parents[1] @@ -34,6 +35,7 @@ def main(): no_tocs = [] no_device = [] no_scarf_tag = [] + no_telemetry_snippet = [] no_install_instructions = [] def complain(message): @@ -73,6 +75,9 @@ def complain(message): if not check_scarf_tag(nb_path): no_scarf_tag.append(str(nb_path.relative_to(NOTEBOOKS_ROOT))) complain(f"FAILED: {nb_path.relative_to(NOTEBOOKS_ROOT)}: Scarf Pixel tag is not found") + if not check_telemetry_snippet(nb_path): + no_telemetry_snippet.append(str(nb_path.relative_to(NOTEBOOKS_ROOT))) + complain(f"FAILED: {nb_path.relative_to(NOTEBOOKS_ROOT)}: telemetry snippet is not found") if not check_install_instructions(nb_path): no_install_instructions.append(str(nb_path.relative_to(NOTEBOOKS_ROOT))) complain(f"FAILED: {nb_path.relative_to(NOTEBOOKS_ROOT)}: Install Instructions section is not found") @@ -94,6 +99,11 @@ def complain(message): print("\n".join(no_scarf_tag)) print("\nYou can generate Scarf Pixel tag with the following command:\n python .ci/scarf_pixel.py -s ") print("==================================") + if no_telemetry_snippet: + print("NO TELEMETRY SNIPPET:") + print("\n".join(no_telemetry_snippet)) + print("\nYou can generate telemetry snippet with the following command:\n python .ci/telemetry_snippet.py -s ") + print("==================================") if no_install_instructions: print("NO INSTALL INSTRUCTIONS SECTION:") print("\n".join(no_install_instructions))