Creating your own task

Task Template Generation

For convenient work with tasks, there is TestsGeneratorFramework Download it and go to the main folder where there is manager.py

To generate a task, enter the following in the console ({NAME} is the task name)

python manager.py create {NAME} -f -e

On Linux, you may need to run it using the python3 command

python3 manager.py create {NAME} -f -e

After that, our folder appears in the programms folder (In the example {NAME} = test)

File Name
Purpose

description.txt

Task Description

in_data.txt

Input Data for the Task

name.txt

Task Name

out_data.txt

Output Data for the Task

File Name
Purpose

build.py

File for task assembly. (We will discuss it later)

main.py

Reference program for the task (Tests will be generated based on this)

Now let's look at the contents of the build.py file.

examples - dictionary where the key is input data, and the value is output data input_data - list with input values for which tests will be generated

To better understand, let's look at the task page and see what exactly is substituted where. And let's try to create a similar task.

Your Own Tests for the Program

We will write the examples ourselves, but the input data will be generated using the program. Modify build.py and the reference program

Modifying the Description

The system can accept text in Markdown format. [Markdown Examples]

We also modify the description, input, and output data. I won't show it because there will be a lot of text. I'll just write test everywhere.

All Files

Task Generation

After all the steps, run build.py

Output

We now have a build.json file. This is our generated task. We will upload it to the platform.

This file contains all data, tests, and examples.

build.json

Done!

Last updated