Skip to content
Snippets Groups Projects
Commit 00b8ba3a authored by Jan David Mol's avatar Jan David Mol
Browse files

TMSS-64: Added dataformats to connectors, fixed tests.

parent 4344b796
No related branches found
No related tags found
1 merge request!400Resolve TMSS-64 "Pulsar pipeline"
...@@ -423,20 +423,28 @@ def populate_connectors(): ...@@ -423,20 +423,28 @@ def populate_connectors():
# beamforming observation # beamforming observation
TaskConnectorType.objects.create(role=Role.objects.get(value=Role.Choices.BEAMFORMER.value), TaskConnectorType.objects.create(role=Role.objects.get(value=Role.Choices.BEAMFORMER.value),
datatype=Datatype.objects.get(value=Datatype.Choices.TIME_SERIES.value), datatype=Datatype.objects.get(value=Datatype.Choices.TIME_SERIES.value),
dataformat=Dataformat.objects.get(value=Dataformat.Choices.BEAMFORMED.value),
task_template=TaskTemplate.objects.get(name='beamforming observation'), task_template=TaskTemplate.objects.get(name='beamforming observation'),
iotype=IOType.objects.get(value=IOType.Choices.OUTPUT.value)) iotype=IOType.objects.get(value=IOType.Choices.OUTPUT.value))
# pulsar pipeline # pulsar pipeline
TaskConnectorType.objects.create(role=Role.objects.get(value=Role.Choices.ANY.value), TaskConnectorType.objects.create(role=Role.objects.get(value=Role.Choices.BEAMFORMER.value),
datatype=Datatype.objects.get(value=Datatype.Choices.TIME_SERIES.value), datatype=Datatype.objects.get(value=Datatype.Choices.TIME_SERIES.value),
dataformat=Dataformat.objects.get(value=Dataformat.Choices.BEAMFORMED.value),
task_template=TaskTemplate.objects.get(name='pulsar pipeline'), task_template=TaskTemplate.objects.get(name='pulsar pipeline'),
iotype=IOType.objects.get(value=IOType.Choices.INPUT.value)) iotype=IOType.objects.get(value=IOType.Choices.INPUT.value))
for datatype_value in (Datatype.Choices.QUALITY.value, Datatype.Choices.PULSAR_PROFILE.value): TaskConnectorType.objects.create(role=Role.objects.get(value=Role.Choices.ANY.value),
TaskConnectorType.objects.create(role=Role.objects.get(value=Role.Choices.ANY.value), datatype=Datatype.objects.get(value=Datatype.Choices.QUALITY.value),
datatype=Datatype.objects.get(value=datatype_value), dataformat=Dataformat.objects.get(value=Dataformat.Choices.PULP_SUMMARY.value),
task_template=TaskTemplate.objects.get(name='pulsar pipeline'), task_template=TaskTemplate.objects.get(name='pulsar pipeline'),
iotype=IOType.objects.get(value=IOType.Choices.OUTPUT.value)) iotype=IOType.objects.get(value=IOType.Choices.OUTPUT.value))
TaskConnectorType.objects.create(role=Role.objects.get(value=Role.Choices.ANY.value),
datatype=Datatype.objects.get(value=Datatype.Choices.PULSAR_PROFILE.value),
dataformat=Dataformat.objects.get(value=Dataformat.Choices.PULP_ANALYSIS.value),
task_template=TaskTemplate.objects.get(name='pulsar pipeline'),
iotype=IOType.objects.get(value=IOType.Choices.OUTPUT.value))
# preprocessing pipeline # preprocessing pipeline
for iotype_value in (IOType.Choices.INPUT.value, IOType.Choices.OUTPUT.value): for iotype_value in (IOType.Choices.INPUT.value, IOType.Choices.OUTPUT.value):
......
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
"type": "string", "type": "string",
"title": "Data Type", "title": "Data Type",
"description": "The data type of a task connector describes its what kind of data is produced/consumed.", "description": "The data type of a task connector describes its what kind of data is produced/consumed.",
"enum": ["visibilities", "time series", "instrument model", "image", "quality"] "enum": ["visibilities", "time series", "instrument model", "image", "quality", "pulsar profile"]
}, },
"dataformat": { "dataformat": {
"type": "string", "type": "string",
"title": "Data Format", "title": "Data Format",
"description": "The data type of a task connector describes in which format the data is produced/consumed.", "description": "The data type of a task connector describes in which format the data is produced/consumed.",
"enum": ["MeasurementSet", "Beamformed", "QA_HDF5", "QA_Plots"] "enum": ["MeasurementSet", "Beamformed", "QA_HDF5", "QA_Plots", "pulp summary", "pulp analysis"]
} }
}, },
"required": [ "required": [
...@@ -38,4 +38,4 @@ ...@@ -38,4 +38,4 @@
] ]
} }
} }
} }
\ No newline at end of file
...@@ -484,12 +484,7 @@ _isCobalt=T ...@@ -484,12 +484,7 @@ _isCobalt=T
set_subtask_state_following_allowed_transitions(subtask_obs, 'finishing') set_subtask_state_following_allowed_transitions(subtask_obs, 'finishing')
subtask_obs_output = models.SubtaskOutput.objects.create(**SubtaskOutput_test_data(subtask=subtask_obs)) subtask_obs_output = models.SubtaskOutput.objects.create(**SubtaskOutput_test_data(subtask=subtask_obs))
<<<<<<< HEAD subtask_data = Subtask_test_data(subtask_template=models.SubtaskTemplate.objects.get(name='preprocessing pipeline'))
subtask_data = Subtask_test_data(state=models.SubtaskState.objects.get(value='finishing'),
subtask_template=models.SubtaskTemplate.objects.get(name='preprocessing pipeline'))
=======
subtask_data = Subtask_test_data(subtask_template=models.SubtaskTemplate.objects.get(name='pipeline control'))
>>>>>>> master
subtask_pipe: models.Subtask = models.Subtask.objects.create(**subtask_data) subtask_pipe: models.Subtask = models.Subtask.objects.create(**subtask_data)
set_subtask_state_following_allowed_transitions(subtask_pipe, 'finishing') set_subtask_state_following_allowed_transitions(subtask_pipe, 'finishing')
subtask_pipe_output = models.SubtaskOutput.objects.create(**SubtaskOutput_test_data(subtask=subtask_pipe)) subtask_pipe_output = models.SubtaskOutput.objects.create(**SubtaskOutput_test_data(subtask=subtask_pipe))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment