SIENTIAPDE-1314
Refactor workflow names to include 'subworkflow' prefix - Updated the workflow definitions and calls in the predictions_batch, format_and_export_prediction, and prediction_process files to use the 'subworkflow' prefix for consistency. - Adjusted corresponding test cases to reflect these changes in workflow execution calls.
This commit is contained in:
@@ -114,4 +114,4 @@ class PredictionsBatch:
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Execute prediction process workflow
|
# Execute prediction process workflow
|
||||||
await workflow.execute_child_workflow('prediction_process', prediction_input)
|
await workflow.execute_child_workflow('subworkflow.prediction_process', prediction_input)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ with workflow.unsafe.imports_passed_through():
|
|||||||
from laborious.activities.activities import Activities
|
from laborious.activities.activities import Activities
|
||||||
|
|
||||||
|
|
||||||
@workflow.defn(name='format_and_export_prediction')
|
@workflow.defn(name='subworkflow.format_and_export_prediction')
|
||||||
class FormatAndExportPrediction:
|
class FormatAndExportPrediction:
|
||||||
"""
|
"""
|
||||||
Data formatting and export workflow for prediction results.
|
Data formatting and export workflow for prediction results.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ with workflow.unsafe.imports_passed_through():
|
|||||||
from laborious.activities.activities import Activities
|
from laborious.activities.activities import Activities
|
||||||
|
|
||||||
|
|
||||||
@workflow.defn(name='prediction_process')
|
@workflow.defn(name='subworkflow.prediction_process')
|
||||||
class PredictionProcess:
|
class PredictionProcess:
|
||||||
"""
|
"""
|
||||||
Core prediction processing workflow for the Laborious system.
|
Core prediction processing workflow for the Laborious system.
|
||||||
@@ -194,7 +194,7 @@ class PredictionProcess:
|
|||||||
|
|
||||||
# Delegate to export workflow for data persistence
|
# Delegate to export workflow for data persistence
|
||||||
await workflow.execute_child_workflow(
|
await workflow.execute_child_workflow(
|
||||||
'format_and_export_prediction',
|
'subworkflow.format_and_export_prediction',
|
||||||
{
|
{
|
||||||
'metadata': metadata,
|
'metadata': metadata,
|
||||||
'path_flag': path_flag,
|
'path_flag': path_flag,
|
||||||
@@ -275,7 +275,7 @@ class PredictionProcess:
|
|||||||
elif path_flag == 'CONTINUE':
|
elif path_flag == 'CONTINUE':
|
||||||
# call write workflow
|
# call write workflow
|
||||||
await workflow.execute_child_workflow(
|
await workflow.execute_child_workflow(
|
||||||
'format_and_export_prediction',
|
'subworkflow.format_and_export_prediction',
|
||||||
{
|
{
|
||||||
'metadata': metadata,
|
'metadata': metadata,
|
||||||
'path_flag': path_flag,
|
'path_flag': path_flag,
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ async def test_run(workflow_mock, prediction_process):
|
|||||||
)
|
)
|
||||||
|
|
||||||
workflow_mock.execute_child_workflow.assert_called_once_with(
|
workflow_mock.execute_child_workflow.assert_called_once_with(
|
||||||
'format_and_export_prediction',
|
'subworkflow.format_and_export_prediction',
|
||||||
{
|
{
|
||||||
'metadata': metadata,
|
'metadata': metadata,
|
||||||
'path_flag': 'continue',
|
'path_flag': 'continue',
|
||||||
@@ -730,7 +730,7 @@ async def test_path_flag_handler_continue(workflow_mock, prediction_process):
|
|||||||
assert result is True
|
assert result is True
|
||||||
workflow_mock.execute_activity_method.assert_not_called()
|
workflow_mock.execute_activity_method.assert_not_called()
|
||||||
workflow_mock.execute_child_workflow.assert_called_once_with(
|
workflow_mock.execute_child_workflow.assert_called_once_with(
|
||||||
'format_and_export_prediction',
|
'subworkflow.format_and_export_prediction',
|
||||||
{
|
{
|
||||||
'metadata': metadata,
|
'metadata': metadata,
|
||||||
'path_flag': path_flag,
|
'path_flag': path_flag,
|
||||||
|
|||||||
@@ -75,5 +75,5 @@ async def test_run(workflow_mock: AsyncMock, predictions_batch: PredictionsBatch
|
|||||||
}
|
}
|
||||||
|
|
||||||
workflow_mock.execute_child_workflow.assert_has_calls(
|
workflow_mock.execute_child_workflow.assert_has_calls(
|
||||||
[call('prediction_process', prediction_input)]
|
[call('subworkflow.prediction_process', prediction_input)]
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user