From 651e8f6eb06abbfbd513d1966a8f79fbc9fdf05c Mon Sep 17 00:00:00 2001 From: Elena Shirokova Date: Tue, 21 Jan 2025 10:36:25 +0100 Subject: [PATCH] add the notebook description --- .../unit-tests-generator.ipynb | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/week4/community-contributions/unit-tests-generator.ipynb b/week4/community-contributions/unit-tests-generator.ipynb index 9ff116a..4076149 100644 --- a/week4/community-contributions/unit-tests-generator.ipynb +++ b/week4/community-contributions/unit-tests-generator.ipynb @@ -18,6 +18,23 @@ "#!pipenv install pytest pytest-cov" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Current flow:\n", + "\n", + "1. For a python code it generates the unit tests using `pytest` library. The dashboard supports tests execution along with a coverage report. If the unit tests are fine, there is an option to save them for future use. It can happen, especially with Ollama , the tests are having a typing error. In this case the code can be edited in the right window and executed afterwards. \n", + "\n", + "2. Supports 3 models: \n", + "\n", + "- gpt-4o-mini\n", + "- claude-3-5-sonnet-20240620\n", + "- llama3.2\n", + "\n", + "It is recommended though to use other models except Ollama, my tests showed the code returned from ollama required more supervision and editing. Some generated unit tests from ollama don't provide full coverage, but still it is a good starting point for building such a tool." + ] + }, { "cell_type": "code", "execution_count": 2, @@ -419,13 +436,6 @@ "ui.launch(inbrowser=True)\n", "# ui.launch()" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": {