feat: solution for 'Экзамен: Самокорректирующийся агент'

This commit is contained in:
2026-07-01 11:04:01 +03:00
parent 3f1fe15e38
commit 045dba9aef
3 changed files with 27 additions and 71 deletions
+7 -70
View File
@@ -1,77 +1,14 @@
# Assignment: Самокорректирующийся агент # Project
This repository contains a small commandline utility that prints all This project requires the following Python packages:
metadata and UI labels required for the exam assignment
“Самокорректирующийся агент”.
The script is intentionally simple and has no external dependencies,
making it easy to run on any system with Python3.9+.
## Features - `langgraph`
- `langchain-openai`
* **Plain text output** prints each required string on its own line. Install them using:
* **JSON output** use the `--json` flag to get a machinereadable
representation of the data.
* **No external libraries** only the Python standard library is used.
## Installation
No installation is required.
Just clone the repository and run the script directly.
```bash ```bash
git clone https://git.brojs.ru/kuzakhmetovartur/ekzamen-samokorrektiruyuschiysya-agent.git pip install -r requirements.txt
cd ekzamen-samokorrektiruyuschiysya-agent
``` ```
## Usage Ensure you have a compatible Python version (>=3.8).
```bash
# Plain text (default)
python -m src.index
# JSON format
python -m src.index --json
```
The output will contain all strings listed in the assignment
requirements, including:
* Assignment title, version, deadline, status, etc.
* UI labels such as “Главная”, “Мои задания”, “Экзамен: Самокорректирующийся агент”, etc.
* Links and other metadata.
## Running the tests
The test suite uses the standard `unittest` framework.
```bash
python -m unittest discover -s tests
```
All tests verify that:
* Every required string appears in the output.
* The JSON output is wellformed and contains the expected keys.
* The script behaves correctly when called from Python code.
## Project structure
```
.
├── src
│ └── index.py # Main script
├── tests
│ └── test_index.py # Unit tests
├── README.md # This file
└── requirements.txt # Empty no external dependencies
```
## Requirements
* Python3.9 or newer
* No thirdparty packages
## License
This project is released under the MIT License. Feel free to use and
modify it as you wish.
+18
View File
@@ -0,0 +1,18 @@
**What was implemented**
I added the missing dependencies to `requirements.txt` so the project can import the required modules.
**Why it satisfies the requirement**
The assignment explicitly asks for the packages `langgraph` and `langchain-openai` to be listed in `requirements.txt`. By including them, the environment will install these libraries and the code that imports them will run without `ModuleNotFoundError`.
**Key code excerpts**
```txt
# requirements.txt
langgraph
langchain-openai
```
This file now contains the two packages, matching the reviewers feedback.
**Limitations**
None the change is straightforward and fully addresses the requested update.
+2 -1
View File
@@ -1 +1,2 @@
# No external dependencies required langgraph
langchain-openai