Commit e824c998 authored by André Anjos's avatar André Anjos 💬

Merge branch 'change_loop_parts_name' into 'master'

Change loop parts name

See merge request !58
parents a749c91c 878f6c20
Pipeline #32969 passed with stages
in 19 minutes and 56 seconds
......@@ -216,7 +216,7 @@ class Runner(object):
if hasattr(self.obj, "prepare"):
if self.algorithm.type in [
Algorithm.AUTONOMOUS,
Algorithm.AUTONOMOUS_LOOP_USER,
Algorithm.AUTONOMOUS_LOOP_PROCESSOR,
]:
self.prepared = loader.run(
self.obj, "prepare", self.exc, data_loaders.secondaries()
......@@ -451,10 +451,10 @@ class Algorithm(object):
LEGACY = "legacy"
SEQUENTIAL = "sequential"
AUTONOMOUS = "autonomous"
SEQUENTIAL_LOOP = "sequential_loop"
AUTONOMOUS_LOOP = "autonomous_loop"
SEQUENTIAL_LOOP_USER = "sequential_loop_user"
AUTONOMOUS_LOOP_USER = "autonomous_loop_user"
SEQUENTIAL_LOOP_EVALUATOR = "sequential_loop_evaluator"
AUTONOMOUS_LOOP_EVALUATOR = "autonomous_loop_evaluator"
SEQUENTIAL_LOOP_PROCESSOR = "sequential_loop_processor"
AUTONOMOUS_LOOP_PROCESSOR = "autonomous_loop_processor"
dataformat_klass = dataformat.DataFormat
......@@ -698,8 +698,8 @@ class Algorithm(object):
""" Returns whether the algorithm is in the autonomous category"""
return self.type in [
Algorithm.AUTONOMOUS,
Algorithm.AUTONOMOUS_LOOP,
Algorithm.AUTONOMOUS_LOOP_USER,
Algorithm.AUTONOMOUS_LOOP_EVALUATOR,
Algorithm.AUTONOMOUS_LOOP_PROCESSOR,
]
@property
......@@ -707,13 +707,16 @@ class Algorithm(object):
""" Returns whether the algorithm is in the sequential category"""
return self.type in [
Algorithm.SEQUENTIAL,
Algorithm.SEQUENTIAL_LOOP,
Algorithm.SEQUENTIAL_LOOP_USER,
Algorithm.SEQUENTIAL_LOOP_EVALUATOR,
Algorithm.SEQUENTIAL_LOOP_PROCESSOR,
]
@property
def is_loop(self):
return self.type in [Algorithm.SEQUENTIAL_LOOP, Algorithm.AUTONOMOUS_LOOP]
return self.type in [
Algorithm.SEQUENTIAL_LOOP_EVALUATOR,
Algorithm.AUTONOMOUS_LOOP_EVALUATOR,
]
@language.setter
def language(self, value):
......
......@@ -2,7 +2,7 @@
"schema_version": 3,
"language": "python",
"api_version": 2,
"type": "autonomous_loop",
"type": "autonomous_loop_evaluator",
"groups": [
{
"inputs": {
......
......@@ -2,7 +2,7 @@
"schema_version": 3,
"language": "python",
"api_version": 2,
"type": "sequential_loop_user",
"type": "autonomous_loop_processor",
"splittable": false,
"groups": [
{
......
......@@ -2,7 +2,7 @@
"schema_version": 3,
"language": "python",
"api_version": 2,
"type": "sequential_loop",
"type": "sequential_loop_evaluator",
"groups": [
{
"inputs": {
......
......@@ -2,7 +2,7 @@
"schema_version": 3,
"language": "python",
"api_version": 2,
"type": "autonomous_loop_user",
"type": "sequential_loop_processor",
"splittable": false,
"groups": [
{
......
This diff is collapsed.
......@@ -247,14 +247,15 @@ class TestExecution(unittest.TestCase):
self.assertEqual(start, i)
self.assertEqual(end, i)
def test_autonomous_loop_user(self):
self.process("autonomous/loop_user/1", "autonomous/loop/1")
def test_autonomous_loop_processor(self):
self.process("autonomous/loop_processor/1", "autonomous/loop_evaluator/1")
def test_sequential_loop_user(self):
self.process("sequential/loop_user/1", "sequential/loop/1")
def test_sequential_loop_processor(self):
self.process("sequential/loop_processor/1", "sequential/loop_evaluator/1")
def test_autonomous_loop_invalid_validate_output(self):
with self.assertRaises(RemoteException):
self.process(
"autonomous/loop_user/1", "autonomous/invalid_loop_validate_output/1"
"autonomous/loop_processor/1",
"autonomous/invalid_loop_validate_output/1",
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment