SIENTIAPDE-1193
Enhance test cases to include datetime_columns for improved timestamp handling in minimal_retrain and predictions_batch functions
This commit is contained in:
1
coverage.sh
Executable file
1
coverage.sh
Executable file
@@ -0,0 +1 @@
|
|||||||
|
pytest --cov=orchestrator --cov-report=html && xdg-open htmlcov/index.html
|
||||||
@@ -41,6 +41,7 @@ def test_minimal_retrain():
|
|||||||
"name": "test_model_name"
|
"name": "test_model_name"
|
||||||
},
|
},
|
||||||
"query": "select * from sientia_data.laborious_data order by \"timestamp\" desc limit 30;",
|
"query": "select * from sientia_data.laborious_data order by \"timestamp\" desc limit 30;",
|
||||||
|
"datetime_columns": ["timestamp"]
|
||||||
}
|
}
|
||||||
result = minimal_retrain(config)
|
result = minimal_retrain(config)
|
||||||
expected = {
|
expected = {
|
||||||
@@ -53,6 +54,7 @@ def test_minimal_retrain():
|
|||||||
"query": "select * from sientia_data.laborious_data order by \"timestamp\" desc limit 30;",
|
"query": "select * from sientia_data.laborious_data order by \"timestamp\" desc limit 30;",
|
||||||
"schema": "sientia_data",
|
"schema": "sientia_data",
|
||||||
"table_name": "log_retrain",
|
"table_name": "log_retrain",
|
||||||
|
"datetime_columns": ["timestamp"]
|
||||||
}
|
}
|
||||||
assert result == expected
|
assert result == expected
|
||||||
|
|
||||||
@@ -195,6 +197,7 @@ def test_predictions_batch(mock_process_path_priority,
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"path_priority": ["STOP", "CONTINUE", "REPEAT"],
|
"path_priority": ["STOP", "CONTINUE", "REPEAT"],
|
||||||
|
"datetime_columns": ["timestamp"]
|
||||||
}
|
}
|
||||||
|
|
||||||
result = predictions_batch(config)
|
result = predictions_batch(config)
|
||||||
@@ -268,7 +271,8 @@ def test_predictions_batch(mock_process_path_priority,
|
|||||||
"config": {}
|
"config": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"path_priority": ["STOP", "CONTINUE", "REPEAT"]
|
"path_priority": ["STOP", "CONTINUE", "REPEAT"],
|
||||||
|
"datetime_columns": ["timestamp"]
|
||||||
}
|
}
|
||||||
assert result == expected
|
assert result == expected
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user