From d4399cf2f3084dc11cc6b61b0dff46dcc9fb3948 Mon Sep 17 00:00:00 2001 From: yatarkan Date: Mon, 23 Dec 2024 20:27:40 +0400 Subject: [PATCH] Add telemetry snippet adding instructions --- CONTRIBUTING.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 157dbb14cda..829f4843f33 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -132,7 +132,13 @@ To do this, there are a few requirements that all notebooks need to pass. 5. Add **Table of content** to top of the Notebook, it helps to get quick fist understanding of content and ease of navigation in the dev environment. There is no need to think about it during development, it can be built or updated after changes with `.ci\table_of_content.py`. Just run the script with the parameter `-s/--source`, specifying a Notebook or a folder with several notebooks as value, the changes will be applied to all of them. 6. Add **Installation Instructions** section to the top of the notebook (after "Table of content") and to the corresponding `README.md` file in the notebook directory. See existing notebooks for the reference. 7. Add Scarf Pixel tag for analytics to the notebook (at the end of the first cell) and to the corresponding `README.md` file (to the end of the file). Add relative path to the notebook or `README.md` file as `path` URL query parameter. Example: ``. You can use the following command to generate the tag and add it to the file: `python .ci/scarf_pixel.py -s `. -8. In case if notebook has specific requirements on python version or OS, it should be noted on top of notebook (before any code blocks) using +8. Add telemetry snippet to the notebook file (e.g. to the cell with fetching notebook_utils file) for tracking notebook execution. Add notebook file name as a parameter to `collect_telemetry()` function. You can use the following command to generate the snippet and add it to the notebook file: `python .ci/telemetry_snippet.py -s `. Snippet example: + ```python + # Read more about telemetry collection at https://github.com/openvinotoolkit/openvino_notebooks?tab=readme-ov-file#-telemetry + from notebook_utils import collect_telemetry + collect_telemetry(".ipynb") + ``` +1. In case if notebook has specific requirements on python version or OS, it should be noted on top of notebook (before any code blocks) using following colored block: ```
Important note: This notebook requires python >= 3.9. Please make sure that your environment fulfill to this requirement before running it