SIENTIAPDE-1325
Refactor monitoring and metrics integration across various components - Removed coverage options from `pyproject.toml`. - Updated prediction metrics in `README.md` to replace `pipeline_name` with `workflow_name`. - Upgraded `sientia-dataops-library` dependency version in `requirements-light.txt` and `requirements.txt`. - Enhanced metrics handling in `laborious` activities, including `Activities`, `Gates`, `MLFlow`, and `OPC`, to utilize a new `MetricsController`. - Refactored metric emission methods to improve clarity and consistency across the codebase. - Updated tests to reflect changes in metrics handling and ensure proper functionality.
This commit is contained in:
35
tests.ipynb
35
tests.ipynb
@@ -453,11 +453,40 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 6,
|
||||
"id": "1fbb3788",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"test\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from unittest.mock import MagicMock\n",
|
||||
"from asyncua.ua.uaerrors import BadAlreadyExists\n",
|
||||
"\n",
|
||||
"mock1 = MagicMock(\n",
|
||||
" side_effect = Exception(\"test\")\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"mock2 = MagicMock(\n",
|
||||
" side_effect = BadAlreadyExists(\"test\")\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"try:\n",
|
||||
" mock1()\n",
|
||||
"except ValueError as e:\n",
|
||||
" try:\n",
|
||||
" mock2()\n",
|
||||
" except BadAlreadyExists as e:\n",
|
||||
" print(e)\n",
|
||||
"except Exception as e:\n",
|
||||
" print(e)\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
Reference in New Issue
Block a user