Commit Graph

144 Commits

Author SHA1 Message Date
vitor-aignosi
12683e1eff SIENTIAPDE-1712
Add unique constraint on (model_id, timestamp, variable) in schema and implement idempotent export test to ensure no duplicates are created. Update CoreScouter and related tests to handle conflict resolution by ignoring duplicates.
2026-07-21 09:34:53 -03:00
vitor-aignosi
34dbc886f3 SIENTIAPDE-1646
Update project configuration and dependencies

- Added .mypy_cache and .cursor to .gitignore.
- Changed asyncio_default_fixture_loop_scope and asyncio_default_test_loop_scope to "session" in pyproject.toml.
- Updated e2e testing dependencies in requirements-dev.txt, replacing fakeredis and mongomock with pytest-httpserver.
- Updated requirements.txt to use sientia_do instead of a specific git commit.
- Modified sonar-project.properties to remove a file from coverage exclusions.
- Enhanced E2E test fixtures in e2e/conftest.py for better container management.
- Cleaned up e2e test files related to CoreScouter and PIWebAPIScouter workflows.
2026-05-25 12:58:03 -03:00
vitor-aignosi
c8b287ecdd SIENTIAPDE-1478
Add headers configuration to API class for improved request handling
2026-01-27 11:43:46 -03:00
vitor-aignosi
59e8f9c8c7 Update scouter/workflow/pi_web_api_scouter.py
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
2026-01-23 13:15:28 -03:00
vitor-aignosi
cf367f2319 SIENTIAPDE-1478
Enhance API class to format timestamps correctly and improve logging. Update test cases to include 'end_time' parameter for better data retrieval flexibility.
2026-01-23 10:40:30 -03:00
vitor-aignosi
fb4bef317d SIENTIAPDE-1478
Remove unused import for DATETIME_FORMAT_WITH_TZ in API class to streamline code and improve readability.
2026-01-23 10:10:52 -03:00
vitor-aignosi
e64af1aa7c SIENTIAPDE-1478
Update tests.ipynb and API class in scouter module

- Reset execution counts in tests.ipynb for reproducibility.
- Removed unnecessary outputs and adjusted execution counts for clarity.
- Enhanced API class to accept 'end_time' parameter for improved data retrieval flexibility.
- Commented out timestamp formatting and normalization for future adjustments.
2026-01-21 15:38:22 -03:00
vitor-aignosi
9dab8da5b3 SIENTIAPDE-1478
Refactor API class to remove unnecessary blank line and improve code readability. Update test cases to rename 'timeout' parameter to 'request_timeout' for consistency.
2026-01-19 10:11:36 -03:00
vitor-aignosi
dc38309348 SIENTIAPDE-1478
Update tests.ipynb and prepare_worker.py

- Reset execution counts in tests.ipynb for reproducibility.
- Removed error outputs and added new tags in TAG_NAMES for enhanced data retrieval.
- Introduced JSON export of web_ids to 'web_ids.json' for better data management.
- Added comments in prepare_worker.py to clarify worker configuration parameters.
2026-01-13 15:53:25 -03:00
vitor-aignosi
efeb29414e SIENTIAPDE-1478
Refactor timestamp normalization in API class to handle NaN values correctly by dropping them before calculating the maximum timestamp.
2026-01-12 12:38:59 -03:00
vitor-aignosi
0bc8b55a3d SIENTIAPDE-1478
Enhance API class logging by adding debug statement for latest values retrieval
2026-01-12 12:34:28 -03:00
vitor-aignosi
9ca7c43b2b SIENTIAPDE-1478
Refactor API class to rename 'timeout' parameter to 'request_timeout' for improved clarity and consistency.
2026-01-12 12:27:26 -03:00
vitor-aignosi
ea081ca348 SIENTIAPDE-1478
Refactor import statements in worker.py to enhance readability and maintain consistency with the new repository structure.
2026-01-09 12:38:46 -03:00
vitor-aignosi
1829307704 SIENTIAPDE-1478
Refactor import statements in worker.py for improved readability and consistency
2026-01-09 12:35:39 -03:00
vitor-aignosi
4352c67f3a SIENTIAPDE-1478
Enhance PI Web API Scouter Workflow and Documentation

- Added support for PI Web API data ingestion, including real-time and historical data retrieval.
- Implemented timestamp normalization to ensure consistency across records.
- Updated README.md to reflect new features and detailed workflow execution flow.
- Enhanced API class with comprehensive error handling and cleanup operations.
- Improved CoreScouter workflow with early exit conditions and detailed processing steps.
- Updated configuration parameters for better clarity and usability.
2026-01-09 09:49:55 -03:00
vitor-aignosi
f94ee12324 SIENTIAPDE-1478
Update import path for connectors_config in worker.py to reflect new repository structure
2026-01-08 16:25:07 -03:00
vitor-aignosi
f2b648ead2 SIENTIAPDE-1478
Refactor metrics and imports across multiple files

- Removed unused import of CORE_LABELS in metrics.py.
- Updated import statements in api.py for consistency.
- Cleaned up import order in worker.py for better readability.
- Added missing newline at the end of metrics.py.
- Adjusted formatting in core_scouter.py to ensure proper syntax.
- Removed redundant 'on_conflict' and 'unique_columns' keys from test cases in test_core_scouter.py for clarity.
2026-01-08 16:20:10 -03:00
vitor-aignosi
cf7f9fb63c SIENTIAPDE-1478
Refactor PIWebAPIClient and Update Configuration Imports

- Removed outdated PostgreSQL, Redis, MongoDB, and API configuration functions from connectors_config.py.
- Deleted the pi_web_api_client.py file as part of the refactor.
- Updated imports in worker.py and api.py to use the new repository structure.
- Cleaned up scenarios.md by removing obsolete scenarios related to unique constraint violations.
- Commented out the specific version of the sientia-dataops-library in requirements.txt for flexibility.
2026-01-08 12:41:53 -03:00
vitor-aignosi
a6a3a9326e SIENTIAPDE-1445
Invert startTime and endTime parameters in PIWebAPIClient to ensure descending order results. Update tests to verify parameter handling and use pytest.approx for floating-point comparisons.
2025-12-23 12:10:11 -03:00
vitor-aignosi
7424844db6 SIENTIAPDE-1445
Add debug logging to PIWebAPIClient for raw data output
2025-12-23 11:30:56 -03:00
vitor-aignosi
57b2a7d2fa SIENTIAPDE-1445
Update values.yaml to change GITHUB_BRANCH to fix/SIENTIAPDE-1445 and modify workflow_name in pi_web_api_scouter.py for clarity
2025-12-23 11:28:29 -03:00
vitor-aignosi
d9fbd132ef SIENTIAPDE-1445
Update debug logging in API class to display latest values as a string for improved readability.
2025-12-23 11:26:09 -03:00
vitor-aignosi
d3945692d0 SIENTIAPDE-1445
Refactor condition in core_scouter.py for improved readability

- Simplified the condition checking for affected rows in the data export logic by removing unnecessary whitespace.
2025-12-22 14:23:30 -03:00
vitor-aignosi
bcc4e6de6d SIENTIAPDE-1445
Normalize package timestamp in API class to ensure consistent data handling.
2025-12-19 16:32:08 -03:00
vitor-aignosi
7f8b7a3b1c SIENTIAPDE-1445
Update requirements.txt and core_scouter.py

- Commented out the Git repository reference for sientia-dataops-library in requirements.txt and replaced it with a local path.
- Modified the condition for data export in core_scouter.py to check for affected rows, enhancing data handling logic.
2025-12-19 15:51:06 -03:00
vitor-aignosi
d9820cf3d7 SIENTIAPDE-1445
Update requirements and enhance tests.ipynb functionality

- Changed the dependency path for sientia-dataops-library in requirements.txt to a local directory.
- Updated execution counts in tests.ipynb for better state management and added new code cells for retrieving web IDs from the PI Web API, improving data handling capabilities.
2025-12-19 11:15:19 -03:00
vitor-aignosi
4bf1a5aae8 SIENTIAPDE-1445
Update queue naming convention in prepare_worker.py to use kebab-case instead of snake_case for improved consistency.
2025-12-18 12:39:13 -03:00
vitor-aignosi
aa1850ce47 SIENTIAPDE-1445
Refactor camelCase conversion in prepare_worker.py to snake_case for consistency in queue naming. Updated function name and logic accordingly.
2025-12-18 12:38:36 -03:00
vitor-aignosi
3bd44bb12b SIENTIAPDE-1445
Refactor imports and enhance timestamp handling in API and test files

- Removed redundant import statements in api.py and prepare_worker.py for cleaner code.
- Updated timestamp format in test cases to include timezone information for consistency.
- Adjusted test configurations to align with new API structure for improved accuracy in data handling.
2025-12-18 09:36:13 -03:00
vitor-aignosi
23e6890692 SIENTIAPDE-1445
Enhance PI Web API integration and update test configurations

- Adjusted execution counts in tests.ipynb for better notebook state management.
- Introduced a new pi_web_api_query structure in tests.ipynb for improved API configuration.
- Updated API class to format timestamps using DATETIME_FORMAT_WITH_TZ.
- Refactored PIWebAPIClient to ensure correct web ID retrieval and emit metrics accurately.
- Streamlined workflow parameters in pi_web_api_scouter.py for clarity and flexibility.
2025-12-18 09:06:11 -03:00
vitor-aignosi
e61cb38b5b SIENTIAPDE-1445
SIENTIAPDE-1445 Add PI Web API configuration to .env.example and enhance worker setup

- Introduced new environment variables for PI Web API configuration in .env.example.
- Updated prepare_worker.py to utilize a camelCase to kebab-case conversion function for queue naming.
- Enhanced logging in prepare_worker to provide better insights during worker preparation.
- Adjusted execution counts in tests.ipynb for improved notebook state management.
2025-12-17 17:02:06 -03:00
vitor-aignosi
034e0b2520 SIENTIAPDE-1445
Refactor workflow parameters in tests.ipynb and prepare_worker.py to enhance clarity and flexibility. Updated workflow_id and task_queue to accept dynamic values, and standardized timeout parameters for improved configuration.
2025-12-17 16:46:15 -03:00
vitor-aignosi
d7d61f27a4 SIENTIAPDE-1445
Update API configuration in values.yaml and connectors_config.py; integrate PIWebAPIScouter into worker setup
2025-12-17 16:42:51 -03:00
vitor-aignosi
e87c5d2da6 SIENTIAPDE-1445
Enhance Activities and API Integration

- Updated Activities class to include API operations for external data ingestion.
- Added API configuration builder to connectors_config.py for environment variable management.
- Integrated API configuration into worker setup.
- Expanded unit tests to cover new API functionality and configuration handling.
- Updated requirements.txt to include pycurl and prometheus-client for enhanced metrics support.
2025-12-17 15:16:00 -03:00
vitor-aignosi
666a0a6e13 SIENTIAPDE-1441
Refactor prepare_worker.py to improve type annotations and code clarity. Update import statements and enhance formatting for better readability. Adjust comments in worker.py for consistency.
2025-12-16 16:01:47 -03:00
vitor-aignosi
5e2403090b SIENTIAPDE-1441
Refactor prepare_worker function to return a single Worker instance instead of a list, streamlining worker configuration and improving code clarity.
2025-12-16 15:43:01 -03:00
vitor-aignosi
f1cdf7471d SIENTIAPDE-1441
SIENTIAPDE-1441: Refactor worker configuration in worker.py to utilize a new prepare_worker function for cleaner setup. Update environment variable names in values.yaml for consistency and clarity, adjusting memory requests and enhancing health check commands for improved application monitoring.
2025-12-16 15:39:54 -03:00
vitor-aignosi
e879107053 SIENTIAPDE-1441
SIENTIAPDE-1442: Enhance Temporal worker configuration by adding environment variables for concurrency limits and poller behavior settings in values.yaml and worker.py for optimized performance.
2025-12-16 10:10:42 -03:00
vitor-aignosi
6701a25c7b SIENTIAPDE-1273
Update GITHUB_BRANCH in values.yaml to feature/SIENTIAPDE-1273, increment Helm chart version to 0.6.0, and modify metrics registration in Gates class to skip None values. Update test cases to reflect changes in tag values.
2025-11-14 12:04:16 -03:00
vitor-aignosi
1b7391e8f1 SIENTIAPDE-1325
Enhance Redis activity by formatting set and get operations for improved readability and consistency. Update tests to include metadata in assertions for better verification of Redis interactions.
2025-11-10 08:39:19 -03:00
vitor-aignosi
082ae682ee SIENTIAPDE-1325
Update requirements to use sientia-dataops-library version 1.5.3 and enhance Redis activity logging by including metadata in get and set operations.
2025-11-06 15:19:55 -03:00
vitor-aignosi
32882d0b6f SIENTIAPDE-1325
Update metric labels from 'pipeline_name' to 'workflow_name' in metrics and related classes, ensuring consistency across the codebase and tests.
2025-11-04 08:49:38 -03:00
vitor-aignosi
4351289111 SIENTIAPDE-1325
Refactor notification methods in Gates, MongoDB, and Redis classes to use asynchronous send_notification_async. Update related tests to ensure proper async handling and verification of notifications.
2025-11-03 14:57:44 -03:00
vitor-aignosi
8350a3a0c3 SIENTIAPDE-1325
Refactor initialization of Activities, Gates, and MongoDB classes for improved readability by using multi-line argument formatting. Update related tests to match the new initialization style.
2025-10-30 16:50:39 -03:00
vitor-aignosi
d4a74ec5eb SIENTIAPDE-1325
Update environment configuration and refactor activities to include metrics controller. Remove Kafka settings and adjust Redis and MongoDB initialization. Update tests to reflect changes in initialization and metrics tracking.
2025-10-30 16:49:55 -03:00
vitor-aignosi
0c16075823 SIENTIAPDE-1325
Update GITHUB_BRANCH in values.yaml to feature/SIENTIAPDE-1325 for specific external operation metrics. Refactor shutdown methods in Activities class to ensure proper closure of MongoDB, Redis, and Gates connections. Adjust tests to reflect these changes and enhance repository pattern implementation for MongoDB and Redis activities.
2025-10-29 16:58:22 -03:00
vitor-aignosi
10b3310677 SIENTIAPDE-1325
Refactor MongoDB, Redis, and Gates classes to extend SientiaMonitoring instead of BaseActivity. Update requirements to point to local dataops library path. Implement repository pattern for MongoDB and Redis operations, enhancing code organization and maintainability.
2025-10-29 16:01:54 -03:00
vitor-aignosi
5dc2971d8c SIENTIAPDE-1314
SIENTIAPDE-1314: Update workflow name from 'sub_core_scouter' to 'subworkflow.core_scouter' in scouter.py and core_scouter.py, and adjust test references accordingly in test_scouter.py for consistency.
2025-10-27 10:16:57 -03:00
vitor-aignosi
6af45c7476 SIENTIAPDE-1314
SIENTIAPDE-1314: Rename core_scouter workflow to sub_core_scouter and update references in scouter.py and test_scouter.py for consistency.
2025-10-27 10:11:07 -03:00
vitor-aignosi
fb1440b0d7 SIENTIAPDE-1314
Remove unnecessary blank line in Redis class definition to improve code readability.
2025-10-23 16:08:44 -03:00