Browse Source

add the notebook description

pull/108/head
Elena Shirokova 4 months ago
parent
commit
651e8f6eb0
  1. 24
      week4/community-contributions/unit-tests-generator.ipynb

24
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": {

Loading…
Cancel
Save