Commit 7949cf16 authored by Philip ABBET's avatar Philip ABBET

[tests] Now test experiments with various combination of input sources

parent 3090adeb
{
"language": "python",
"splittable": false,
"groups": [
{
"inputs": {
"b": {
"type": "user/single_integer/1"
}
},
"outputs": {
"sum": {
"type": "user/single_integer/1"
}
}
},
{
"name": "other",
"inputs": {
"a": {
"type": "user/single_integer/1"
}
}
}
]
}
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
###############################################################################
# #
# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/ #
# Contact: beat.support@idiap.ch #
# #
# This file is part of the beat.core module of the BEAT platform. #
# #
# Commercial License Usage #
# Licensees holding valid commercial BEAT licenses may use this file in #
# accordance with the terms contained in a written agreement between you #
# and Idiap. For further information contact tto@idiap.ch #
# #
# Alternatively, this file may be used under the terms of the GNU Affero #
# Public License version 3 as published by the Free Software and appearing #
# in the file LICENSE.AGPL included in the packaging of this file. #
# The BEAT platform is distributed in the hope that it will be useful, but #
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY #
# or FITNESS FOR A PARTICULAR PURPOSE. #
# #
# You should have received a copy of the GNU Affero Public License along #
# with the BEAT platform. If not, see http://www.gnu.org/licenses/. #
# #
###############################################################################
class Algorithm:
def process(self, inputs, outputs):
a = 0
if inputs['a'].hasMoreData():
inputs['a'].next()
a = inputs['a'].data.value
outputs['sum'].write({
'value': a + inputs['b'].data.value
})
return True
{
"language": "python",
"splittable": false,
"groups": [
{
"inputs": {
"c": {
"type": "user/single_integer/1"
}
},
"outputs": {
"sum": {
"type": "user/single_integer/1"
}
}
},
{
"name": "others",
"inputs": {
"a": {
"type": "user/single_integer/1"
},
"b": {
"type": "user/single_integer/1"
}
}
}
]
}
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
###############################################################################
# #
# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/ #
# Contact: beat.support@idiap.ch #
# #
# This file is part of the beat.core module of the BEAT platform. #
# #
# Commercial License Usage #
# Licensees holding valid commercial BEAT licenses may use this file in #
# accordance with the terms contained in a written agreement between you #
# and Idiap. For further information contact tto@idiap.ch #
# #
# Alternatively, this file may be used under the terms of the GNU Affero #
# Public License version 3 as published by the Free Software and appearing #
# in the file LICENSE.AGPL included in the packaging of this file. #
# The BEAT platform is distributed in the hope that it will be useful, but #
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY #
# or FITNESS FOR A PARTICULAR PURPOSE. #
# #
# You should have received a copy of the GNU Affero Public License along #
# with the BEAT platform. If not, see http://www.gnu.org/licenses/. #
# #
###############################################################################
class Algorithm:
def process(self, inputs, outputs):
a = 0
b = 0
if inputs.groupOf('a').hasMoreData():
inputs.groupOf('a').next()
a = inputs['a'].data.value
b = inputs['b'].data.value
outputs['sum'].write({
'value': a + b + inputs['c'].data.value
})
return True
{
"language": "python",
"splittable": false,
"groups": [
{
"inputs": {
"c": {
"type": "user/single_integer/1"
},
"d": {
"type": "user/single_integer/1"
}
},
"outputs": {
"sum": {
"type": "user/single_integer/1"
}
}
},
{
"name": "others",
"inputs": {
"a": {
"type": "user/single_integer/1"
},
"b": {
"type": "user/single_integer/1"
}
}
}
]
}
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
###############################################################################
# #
# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/ #
# Contact: beat.support@idiap.ch #
# #
# This file is part of the beat.core module of the BEAT platform. #
# #
# Commercial License Usage #
# Licensees holding valid commercial BEAT licenses may use this file in #
# accordance with the terms contained in a written agreement between you #
# and Idiap. For further information contact tto@idiap.ch #
# #
# Alternatively, this file may be used under the terms of the GNU Affero #
# Public License version 3 as published by the Free Software and appearing #
# in the file LICENSE.AGPL included in the packaging of this file. #
# The BEAT platform is distributed in the hope that it will be useful, but #
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY #
# or FITNESS FOR A PARTICULAR PURPOSE. #
# #
# You should have received a copy of the GNU Affero Public License along #
# with the BEAT platform. If not, see http://www.gnu.org/licenses/. #
# #
###############################################################################
class Algorithm:
def process(self, inputs, outputs):
a = 0
b = 0
if inputs.groupOf('a').hasMoreData():
inputs.groupOf('a').next()
a = inputs['a'].data.value
b = inputs['b'].data.value
outputs['sum'].write({
'value': a + b + inputs['c'].data.value + inputs['d'].data.value
})
return True
{
"datasets": {
"integers": {
"database": "integers_db/1",
"protocol": "two_sets",
"set": "double"
}
},
"blocks": {
"echo": {
"algorithm": "user/integers_echo/1",
"parameters": {
},
"inputs": {
"in_data": "in"
},
"outputs": {
"out_data": "out"
}
},
"operation": {
"algorithm": "user/sum/1",
"parameters": {
},
"inputs": {
"a": "a",
"b": "b"
},
"outputs": {
"sum": "result"
}
}
},
"analyzers": {
"analysis": {
"algorithm": "user/integers_analysis/1",
"parameters": {
},
"inputs": {
"input": "input"
}
}
},
"globals": {
"environment": {
"name": "environment",
"version": "1"
},
"queue": "queue"
}
}
{
"datasets": {
"integers1": {
"database": "integers_db/1",
"protocol": "two_sets",
"set": "double"
},
"integers2": {
"database": "integers_db/1",
"protocol": "two_sets",
"set": "triple"
}
},
"blocks": {
"echo": {
"algorithm": "user/integers_echo/1",
"parameters": {
},
"inputs": {
"in_data": "in"
},
"outputs": {
"out_data": "out"
}
},
"operation": {
"algorithm": "user/sum_over_channels/1",
"parameters": {
},
"inputs": {
"a": "a",
"b": "b"
},
"outputs": {
"sum": "result"
}
}
},
"analyzers": {
"analysis": {
"algorithm": "user/integers_analysis/1",
"parameters": {
},
"inputs": {
"input": "input"
}
}
},
"globals": {
"environment": {
"name": "environment",
"version": "1"
},
"queue": "queue"
}
}
{
"datasets": {
"integers1": {
"database": "integers_db/1",
"protocol": "two_sets",
"set": "double"
},
"integers2": {
"database": "integers_db/1",
"protocol": "two_sets",
"set": "triple"
}
},
"blocks": {
"echo": {
"algorithm": "user/integers_echo/1",
"parameters": {
},
"inputs": {
"in_data": "in"
},
"outputs": {
"out_data": "out"
}
},
"operation": {
"algorithm": "user/sum_over_channels/2",
"parameters": {
},
"inputs": {
"a": "a",
"b": "b",
"c": "c"
},
"outputs": {
"sum": "result"
}
}
},
"analyzers": {
"analysis": {
"algorithm": "user/integers_analysis/1",
"parameters": {
},
"inputs": {
"input": "input"
}
}
},
"globals": {
"environment": {
"name": "environment",
"version": "1"
},
"queue": "queue"
}
}
{
"datasets": {
"integers1": {
"database": "integers_db/1",
"protocol": "two_sets",
"set": "double"
},
"integers2": {
"database": "integers_db/1",
"protocol": "two_sets",
"set": "triple"
}
},
"blocks": {
"echo": {
"algorithm": "user/integers_add/1",
"parameters": {
},
"inputs": {
"in_data": "in"
},
"outputs": {
"out_data": "out"
}
},
"operation": {
"algorithm": "user/sum_over_channels/2",
"parameters": {
},
"inputs": {
"a": "a",
"b": "b",
"c": "c"
},
"outputs": {
"sum": "result"
}
}
},
"analyzers": {
"analysis": {
"algorithm": "user/integers_analysis/1",
"parameters": {
},
"inputs": {
"input": "input"
}
}
},
"globals": {
"environment": {
"name": "environment",
"version": "1"
},
"queue": "queue"
}
}
{
"datasets": {
"integers1": {
"database": "integers_db/1",
"protocol": "two_sets",
"set": "double"
},
"integers2": {
"database": "integers_db/1",
"protocol": "two_sets",
"set": "triple"
}
},
"blocks": {
"echo": {
"algorithm": "user/integers_echo/1",
"parameters": {
},
"inputs": {
"in_data": "in"
},
"outputs": {
"out_data": "out"
}
},
"echo2": {
"algorithm": "user/integers_echo/1",
"parameters": {
},
"inputs": {
"in_data": "in"
},
"outputs": {
"out_data": "out"
}
},
"operation": {
"algorithm": "user/sum_over_channels/3",
"parameters": {
},
"inputs": {
"a": "a",
"b": "b",
"c": "c",
"d": "d"
},
"outputs": {
"sum": "result"
}
}
},
"analyzers": {
"analysis": {
"algorithm": "user/integers_analysis/1",
"parameters": {
},
"inputs": {
"input": "input"
}
}
},
"globals": {
"environment": {
"name": "environment",
"version": "1"
},
"queue": "queue"
}
}
{
"datasets": {
"integers1": {
"database": "integers_db/1",
"protocol": "two_sets",
"set": "double"
},
"integers2": {
"database": "integers_db/1",
"protocol": "two_sets",
"set": "triple"
}
},
"blocks": {
"echo": {
"algorithm": "user/integers_add/1",
"parameters": {
},
"inputs": {
"in_data": "in"
},
"outputs": {
"out_data": "out"
}
},
"echo2": {
"algorithm": "user/integers_add/1",
"parameters": {
},
"inputs": {
"in_data": "in"
},
"outputs": {
"out_data": "out"
}
},
"operation": {
"algorithm": "user/sum_over_channels/3",
"parameters": {
},
"inputs": {
"a": "a",
"b": "b",
"c": "c",
"d": "d"
},
"outputs": {
"sum": "result"
}
}
},
"analyzers": {
"analysis": {
"algorithm": "user/integers_analysis/1",
"parameters": {
},
"inputs": {
"input": "input"
}
}
},
"globals": {
"environment": {
"name": "environment",
"version": "1"
},
"queue": "queue"
}
}
{
"datasets": [
{
"name": "integers",
"outputs": [
"a",
"b"
]
}
],
"blocks": [
{
"name": "echo",
"inputs": [
"in"
],
"outputs": [
"out"
],
"synchronized_channel": "integers"
},
{
"name": "operation",
"inputs": [
"a",
"b"
],
"outputs": [
"result"
],
"synchronized_channel": "integers"
}
],
"analyzers": [
{
"name": "analysis",
"inputs": [
"input"
],
"synchronized_channel": "integers"
}
],
"connections": [
{
"from": "integers.a",
"to": "echo.in",
"channel": "integers"
},
{
"from": "echo.out",
"to": "operation.a",
"channel": "integers"
},
{
"from": "integers.b",
"to": "operation.b",
"channel": "integers"
},
{
"from": "operation.result",
"to": "analysis.input",
"channel": "integers"
}
],
"representation": {
"connections": {
},
"blocks": {
},
"channel_colors": {
"integers": "#5555ff"
}
}
}
{
"datasets": [
{
"name": "integers1",
"outputs": [
"a",
"b"
]
},
{
"name": "integers2",
"outputs": [
"a",
"b",
"c"
]
}
],
"blocks": [
{
"name": "echo",
"inputs": [
"in"
],
"outputs": [
"out"