Commit a2c7f31b authored by Samuel GAIST's avatar Samuel GAIST

[test][prefix] Pre-commit cleanup

parent 90e86c7f
...@@ -27,4 +27,4 @@ ...@@ -27,4 +27,4 @@
} }
} }
] ]
} }
\ No newline at end of file
...@@ -35,24 +35,18 @@ ...@@ -35,24 +35,18 @@
class Algorithm: class Algorithm:
def setup(self, parameters): def setup(self, parameters):
self.sync = parameters['sync'] self.sync = parameters["sync"]
return True return True
def process(self, data_loaders, outputs): def process(self, data_loaders, outputs):
data_loader = data_loaders.loaderOf('in1') data_loader = data_loaders.loaderOf("in1")
for i in range(data_loader.count(self.sync)): for i in range(data_loader.count(self.sync)):
view = data_loader.view(self.sync, i) view = data_loader.view(self.sync, i)
(data, start, end) = view[view.count() - 1] (data, start, end) = view[view.count() - 1]
outputs['out'].write({ outputs["out"].write({"value": data["in1"].value + data["in2"].value}, end)
'value': data['in1'].value + data['in2'].value,
},
end
)
return True return True
...@@ -25,4 +25,4 @@ ...@@ -25,4 +25,4 @@
} }
} }
] ]
} }
\ No newline at end of file
...@@ -35,26 +35,20 @@ ...@@ -35,26 +35,20 @@
class Algorithm: class Algorithm:
def prepare(self, data_loaders): def prepare(self, data_loaders):
data_loader = data_loaders.loaderOf('in2') data_loader = data_loaders.loaderOf("in2")
(data, start, end) = data_loader[0] (data, start, end) = data_loader[0]
self.offset = data['in2'].value self.offset = data["in2"].value
return True return True
def process(self, data_loaders, outputs): def process(self, data_loaders, outputs):
data_loader = data_loaders.loaderOf('in1') data_loader = data_loaders.loaderOf("in1")
for i in range(data_loader.count()): for i in range(data_loader.count()):
(data, start, end) = data_loader[i] (data, start, end) = data_loader[i]
outputs['out'].write({ outputs["out"].write({"value": data["in1"].value + self.offset}, end)
'value': data['in1'].value + self.offset,
},
end
)
return True return True
...@@ -28,4 +28,4 @@ ...@@ -28,4 +28,4 @@
} }
} }
] ]
} }
\ No newline at end of file
...@@ -35,21 +35,18 @@ ...@@ -35,21 +35,18 @@
class Algorithm: class Algorithm:
def process(self, data_loaders, outputs): def process(self, data_loaders, outputs):
values = data_loaders.loaderOf('value') values = data_loaders.loaderOf("value")
offsets = data_loaders.loaderOf('offset') offsets = data_loaders.loaderOf("offset")
for i in range(values.count()): for i in range(values.count()):
(data, start, end) = values[i] (data, start, end) = values[i]
offset_index = data['offset_index'].value offset_index = data["offset_index"].value
(data2, start2, end2) = offsets[offset_index] (data2, start2, end2) = offsets[offset_index]
outputs['out'].write({ outputs["out"].write(
'value': data['value'].value + data2['offset'].value, {"value": data["value"].value + data2["offset"].value}, end
},
end
) )
return True return True
...@@ -35,17 +35,12 @@ ...@@ -35,17 +35,12 @@
class Algorithm: class Algorithm:
def process(self, data_loaders, outputs): def process(self, data_loaders, outputs):
data_loader = data_loaders.loaderOf('in') data_loader = data_loaders.loaderOf("in")
for i in range(data_loader.count()): for i in range(data_loader.count()):
(data, start, end) = data_loader[i] (data, start, end) = data_loader[i]
outputs['out'].write({ outputs["out"].write({"value": data["in"].value}, end)
'value': data['in'].value,
},
end
)
return True return True
...@@ -35,6 +35,5 @@ ...@@ -35,6 +35,5 @@
class Algorithm: class Algorithm:
def process(self, data_loaders, outputs): def process(self, data_loaders, outputs):
return True return True
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
class Algorithm: class Algorithm:
def prepare(self, data_loaders): def prepare(self, data_loaders):
return True return True
......
...@@ -35,40 +35,39 @@ ...@@ -35,40 +35,39 @@
class Algorithm: class Algorithm:
def setup(self, parameters): def setup(self, parameters):
self.int8_value = parameters['int8_value'] self.int8_value = parameters["int8_value"]
self.int8_range = parameters['int8_range'] self.int8_range = parameters["int8_range"]
self.int8_choices = parameters['int8_choices'] self.int8_choices = parameters["int8_choices"]
self.int16_value = parameters['int16_value'] self.int16_value = parameters["int16_value"]
self.int16_range = parameters['int16_range'] self.int16_range = parameters["int16_range"]
self.int16_choices = parameters['int16_choices'] self.int16_choices = parameters["int16_choices"]
self.int32_value = parameters['int32_value'] self.int32_value = parameters["int32_value"]
self.int32_range = parameters['int32_range'] self.int32_range = parameters["int32_range"]
self.int32_choices = parameters['int32_choices'] self.int32_choices = parameters["int32_choices"]
self.int64_value = parameters['int64_value'] self.int64_value = parameters["int64_value"]
self.int64_range = parameters['int64_range'] self.int64_range = parameters["int64_range"]
self.int64_choices = parameters['int64_choices'] self.int64_choices = parameters["int64_choices"]
self.uint8_value = parameters['uint8_value'] self.uint8_value = parameters["uint8_value"]
self.uint8_range = parameters['uint8_range'] self.uint8_range = parameters["uint8_range"]
self.uint8_choices = parameters['uint8_choices'] self.uint8_choices = parameters["uint8_choices"]
self.uint16_value = parameters['uint16_value'] self.uint16_value = parameters["uint16_value"]
self.uint16_range = parameters['uint16_range'] self.uint16_range = parameters["uint16_range"]
self.uint16_choices = parameters['uint16_choices'] self.uint16_choices = parameters["uint16_choices"]
self.uint32_value = parameters['uint32_value'] self.uint32_value = parameters["uint32_value"]
self.uint32_range = parameters['uint32_range'] self.uint32_range = parameters["uint32_range"]
self.uint32_choices = parameters['uint32_choices'] self.uint32_choices = parameters["uint32_choices"]
self.uint64_value = parameters['uint64_value'] self.uint64_value = parameters["uint64_value"]
self.uint64_range = parameters['uint64_range'] self.uint64_range = parameters["uint64_range"]
self.uint64_choices = parameters['uint64_choices'] self.uint64_choices = parameters["uint64_choices"]
self.float32_value = parameters['float32_value'] self.float32_value = parameters["float32_value"]
self.float32_range = parameters['float32_range'] self.float32_range = parameters["float32_range"]
self.float32_choices = parameters['float32_choices'] self.float32_choices = parameters["float32_choices"]
self.float64_value = parameters['float64_value'] self.float64_value = parameters["float64_value"]
self.float64_range = parameters['float64_range'] self.float64_range = parameters["float64_range"]
self.float64_choices = parameters['float64_choices'] self.float64_choices = parameters["float64_choices"]
self.bool_value = parameters['bool_value'] self.bool_value = parameters["bool_value"]
self.string_value = parameters['string_value'] self.string_value = parameters["string_value"]
return True return True
def process(self, data_loaders, outputs): def process(self, data_loaders, outputs):
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
class Algorithm: class Algorithm:
def prepare(self, data_loaders): def prepare(self, data_loaders):
a = b a = b
return True return True
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
class Algorithm: class Algorithm:
def prepare(self, data_loaders): def prepare(self, data_loaders):
return False return False
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
class Algorithm: class Algorithm:
def process(self, data_loaders, outputs): def process(self, data_loaders, outputs):
a = b a = b
return True return True
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
class Algorithm: class Algorithm:
def setup(self, parameters): def setup(self, parameters):
a = b a = b
return True return True
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
class Algorithm: class Algorithm:
def setup(self, parameters): def setup(self, parameters):
return False return False
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
class Algorithm: class Algorithm:
def setup(self, parameters): def setup(self, parameters):
return True return True
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
class Algorithm: class Algorithm:
def setup(self, parameters): def setup(self, parameters):
return True return True
......
...@@ -24,4 +24,4 @@ ...@@ -24,4 +24,4 @@
} }
} }
] ]
} }
\ No newline at end of file
...@@ -35,16 +35,14 @@ ...@@ -35,16 +35,14 @@
class Algorithm: class Algorithm:
def setup(self, parameters): def setup(self, parameters):
self.sync = parameters['sync'] self.sync = parameters["sync"]
return True return True
def process(self, inputs, outputs): def process(self, inputs, outputs):
if inputs[self.sync].isDataUnitDone(): if inputs[self.sync].isDataUnitDone():
outputs['out'].write({ outputs["out"].write(
'value': inputs['in1'].data.value + inputs['in2'].data.value, {"value": inputs["in1"].data.value + inputs["in2"].data.value}
}) )
return True return True
...@@ -22,4 +22,4 @@ ...@@ -22,4 +22,4 @@
} }
} }
] ]
} }
\ No newline at end of file
...@@ -35,18 +35,15 @@ ...@@ -35,18 +35,15 @@
class Algorithm: class Algorithm:
def __init__(self): def __init__(self):
self.offset = None self.offset = None
def process(self, inputs, outputs): def process(self, inputs, outputs):
if self.offset is None: if self.offset is None:
group = inputs.groupOf('in2') group = inputs.groupOf("in2")
group.next() group.next()
self.offset = group['in2'].data.value self.offset = group["in2"].data.value
outputs['out'].write({ outputs["out"].write({"value": inputs["in1"].data.value + self.offset})
'value': inputs['in1'].data.value + self.offset,
})
return True return True
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
class Algorithm: class Algorithm:
def process(self, inputs, outputs): def process(self, inputs, outputs):
outputs['out'].write(inputs['in'].data) outputs["out"].write(inputs["in"].data)
return True return True
...@@ -35,6 +35,5 @@ ...@@ -35,6 +35,5 @@
class InvalidAlgorithmClassName: class InvalidAlgorithmClassName:
def process(self, inputs, outputs): def process(self, inputs, outputs):
return True return True
...@@ -35,6 +35,5 @@ ...@@ -35,6 +35,5 @@
class Algorithm: class Algorithm:
def process(self, inputs, outputs): def process(self, inputs, outputs):
return True return True
...@@ -35,40 +35,39 @@ ...@@ -35,40 +35,39 @@
class Algorithm: class Algorithm:
def setup(self, parameters): def setup(self, parameters):
self.int8_value = parameters['int8_value'] self.int8_value = parameters["int8_value"]
self.int8_range = parameters['int8_range'] self.int8_range = parameters["int8_range"]
self.int8_choices = parameters['int8_choices'] self.int8_choices = parameters["int8_choices"]
self.int16_value = parameters['int16_value'] self.int16_value = parameters["int16_value"]
self.int16_range = parameters['int16_range'] self.int16_range = parameters["int16_range"]
self.int16_choices = parameters['int16_choices'] self.int16_choices = parameters["int16_choices"]
self.int32_value = parameters['int32_value'] self.int32_value = parameters["int32_value"]
self.int32_range = parameters['int32_range'] self.int32_range = parameters["int32_range"]
self.int32_choices = parameters['int32_choices'] self.int32_choices = parameters["int32_choices"]
self.int64_value = parameters['int64_value'] self.int64_value = parameters["int64_value"]
self.int64_range = parameters['int64_range'] self.int64_range = parameters["int64_range"]
self.int64_choices = parameters['int64_choices'] self.int64_choices = parameters["int64_choices"]
self.uint8_value = parameters['uint8_value'] self.uint8_value = parameters["uint8_value"]
self.uint8_range = parameters['uint8_range'] self.uint8_range = parameters["uint8_range"]
self.uint8_choices = parameters['uint8_choices'] self.uint8_choices = parameters["uint8_choices"]
self.uint16_value = parameters['uint16_value'] self.uint16_value = parameters["uint16_value"]
self.uint16_range = parameters['uint16_range'] self.uint16_range = parameters["uint16_range"]
self.uint16_choices = parameters['uint16_choices'] self.uint16_choices = parameters["uint16_choices"]
self.uint32_value = parameters['uint32_value'] self.uint32_value = parameters["uint32_value"]
self.uint32_range = parameters['uint32_range'] self.uint32_range = parameters["uint32_range"]
self.uint32_choices = parameters['uint32_choices'] self.uint32_choices = parameters["uint32_choices"]
self.uint64_value = parameters['uint64_value'] self.uint64_value = parameters["uint64_value"]
self.uint64_range = parameters['uint64_range'] self.uint64_range = parameters["uint64_range"]
self.uint64_choices = parameters['uint64_choices'] self.uint64_choices = parameters["uint64_choices"]
self.float32_value = parameters['float32_value'] self.float32_value = parameters["float32_value"]
self.float32_range = parameters['float32_range'] self.float32_range = parameters["float32_range"]
self.float32_choices = parameters['float32_choices'] self.float32_choices = parameters["float32_choices"]
self.float64_value = parameters['float64_value'] self.float64_value = parameters["float64_value"]
self.float64_range = parameters['float64_range'] self.float64_range = parameters["float64_range"]
self.float64_choices = parameters['float64_choices'] self.float64_choices = parameters["float64_choices"]
self.bool_value = parameters['bool_value'] self.bool_value = parameters["bool_value"]
self.string_value = parameters['string_value'] self.string_value = parameters["string_value"]
return True return True
def process(self, inputs, outputs): def process(self, inputs, outputs):
......
...@@ -24,4 +24,4 @@ ...@@ -24,4 +24,4 @@
} }
} }
] ]
} }
\ No newline at end of file
...@@ -35,18 +35,17 @@ ...@@ -35,18 +35,17 @@
class Algorithm: class Algorithm:
def setup(self, parameters): def setup(self, parameters):
self.sync = parameters['sync'] self.sync = parameters["sync"]
return True return True
def prepare(self): def prepare(self):
return True return True
def process(self, inputs, outputs): def process(self, inputs, outputs):
if inputs[self.sync].isDataUnitDone(): if inputs[self.sync].isDataUnitDone():
outputs['out'].write({ outputs["out"].write(
'value': inputs['in1'].data.value + inputs['in2'].data.value, {"value": inputs["in1"].data.value + inputs["in2"].data.value}
}) )
return True return True
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
class Algorithm: class Algorithm:
def process(self, inputs, outputs): def process(self, inputs, outputs):
a = b a = b
return True return True
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
class Algorithm: class Algorithm:
def setup(self, parameters): def setup(self, parameters):
a = b a = b
return True return True
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
class Algorithm: class Algorithm: