doc: add test generation instructions and update run.sh
Added documentation for test generation through Ollama, including new command-line arguments for `generate_tests.py` and updated `run.sh` script. Also added a new `gen` command to `run.sh` for generating tests via Ollama. This improves usability by providing clear instructions and automation for test generation.
This commit is contained in:
25
README.md
25
README.md
@@ -16,13 +16,31 @@ pip install -r requirements.txt
|
||||
./run.sh run --model llama3 --ollama-url http://localhost:11434
|
||||
```
|
||||
|
||||
### Генерация тестов через Ollama
|
||||
|
||||
```bash
|
||||
# Генерировать 1 тест для каждой категории через Ollama
|
||||
./run.sh gen
|
||||
|
||||
# Или через Python напрямую
|
||||
python scripts/generate_tests.py --count 1 --category all --model llama3 --ollama-url http://localhost:11434
|
||||
```
|
||||
|
||||
### Через Python
|
||||
|
||||
```bash
|
||||
python src/main.py --model llama3 --ollama-url http://localhost:11434
|
||||
```
|
||||
|
||||
### Аргументы
|
||||
### Аргументы для generate_tests.py
|
||||
|
||||
- `--count`: Количество тестов для генерации (по умолчанию: 1)
|
||||
- `--category`: Категория тестов (translation, summarization, codegen, или all) (по умолчанию: all)
|
||||
- `--model`: Название модели для генерации тестов (обязательный)
|
||||
- `--ollama-url`: URL подключения к Ollama серверу (обязательный)
|
||||
- `--validate`: Валидировать тесты в указанной директории
|
||||
|
||||
### Аргументы для main.py
|
||||
|
||||
- `--model`: Название модели для тестирования (обязательный)
|
||||
- `--ollama-url`: URL подключения к Ollama серверу (обязательный)
|
||||
@@ -37,6 +55,11 @@ python src/main.py --model llama3 --ollama-url http://localhost:11434
|
||||
./run.sh run --model llama3 --ollama-url http://localhost:11434
|
||||
```
|
||||
|
||||
Генерация тестов через Ollama:
|
||||
```bash
|
||||
./run.sh gen
|
||||
```
|
||||
|
||||
Запуск только тестов переводов:
|
||||
```bash
|
||||
./run.sh run --model llama3 --ollama-url http://localhost:11434 --benchmarks translation
|
||||
|
||||
Reference in New Issue
Block a user