SIENTIAPDE-1314

Refactor OPC Class and Enhance Testing for Output Management

- Removed the unused 'success' parameter from the manage_output_tags method in the OPC class to streamline its signature.
- Commented out the error handling logic in the OpcRepository for clarity and future reference.
- Added new tests for manage_output_tags to validate successful and failed write operations, ensuring accurate assertions for output data and metrics.
This commit is contained in:
vitor-aignosi
2025-10-27 08:10:19 -03:00
parent 80c987b2dc
commit 1b93eb19cb
3 changed files with 81 additions and 4 deletions

View File

@@ -199,7 +199,6 @@ class OPC(BaseActivity):
config: dict[str, Any],
data: DataFrame,
metadata: dict[str, Any],
success: bool,
) -> tuple[bool, dict[str, float | None]]:
"""
Manage the writing of prediction and confidence data to OPC server tags.
@@ -305,7 +304,7 @@ class OPC(BaseActivity):
continue
local_success, local_response_times = await self.manage_output_tags(
server_id, config, data, metadata, success
server_id, config, data, metadata
)
metrics[server_id] = local_response_times
local_count = len(local_response_times)