SIENTIAPDE-994

Implement new get_last_timestamp method in Gates class, refactor MLFlow activity methods to return only transformed data, and update PredictionsBatch and PredictionProcess workflows to utilize Activities module. Add detailed docstrings for new methods and enhance test coverage for get_last_timestamp functionality.
This commit is contained in:
vitor-aignosi
2025-05-12 11:36:21 -03:00
parent d09fb6ac5e
commit eb6d2dd79c
8 changed files with 540 additions and 83 deletions

View File

@@ -585,3 +585,19 @@ async def test_format_default_prediction(
result = await gates.format_default_prediction(input_data)
assert result == expected_output.to_dict()
@mark.asyncio
async def test_get_last_timestamp(
gates
):
input_data = {
'data': {
'variable': ['variable1', 'variable2'],
'value': [1, 2],
'timestamp': ['2021-01-01', '2021-01-02']
}
}
result = await gates.get_last_timestamp(input_data)
assert result == '2021-01-02'