ut-ras / r5-2019

Region 5 2018-2019
MIT License
5 stars 0 forks source link

Control/task manager #33

Closed thetianshuhuang closed 5 years ago

thetianshuhuang commented 5 years ago

Description

Created task_manager module (#32), which contains a task manager server, and routines to interact with the server.

Added a unittest driven test engine that recursively runs tests on user code. Configure by adding imports to tests.py, and run with python tests.py. Other modules should integrate their testers (if they can be automatically tested) with the test engine.

API

Creating and running a task server:

from task_manager import TaskServer

manager = TaskServer()
manager.run()

# do things
...

manager.stop()

Creating a remote task server::

from task_manager import RemoteTaskManager, RemoteServer

manager = RemoteTaskManager(
    RemoteServer("192.168.0.101:8000", post="", get=""))

# Send new task
manager.put(Task(label="TypeA", data=[1,2,3]))

# get a new task
new = manager.get()

Todos

Things that need to be done but aren't critical (that you promise to get done)