Commit Graph

48 Commits

Author SHA1 Message Date
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
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
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
7958afbadf SIENTIAPDE-1478
Update pytest_asyncio fixture scopes in conftest.py for improved test isolation and add asyncio_default_fixture_loop_scope in pyproject.toml. Remove outdated scenarios from scenarios.md and delete unused test files for cleaner codebase.
2026-01-08 16:13:59 -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
4f076956cc SIENTIAPDE-1445
Update workflow_name in test_pi_web_api_scouter.py to reflect correct naming convention for clarity
2025-12-30 09:00:52 -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
3127efd391 SIENTIAPDE-1445
Update test_api.py and test_core_scouter.py to enhance timestamp validation and add new test cases

- Updated timestamp assertions in test_get_tag_values_success to reflect the correct values.
- Added new test cases in test_core_scouter.py to handle scenarios with zero affected rows and without debug data package, ensuring proper workflow execution and activity method assertions.
2025-12-22 14:32:45 -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
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
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
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
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
f0ca06b4aa SIENTIAPDE-1314
Implement tag value registration in Gates activity and update related tests. Enhanced the write_metrics method to process and register tag values, improving metrics tracking. Adjusted tests to validate new functionality.
2025-10-23 16:02:38 -03:00
vitor-aignosi
9cc55ea5e7 SIENTIAPDE-1312
Update Redis and CoreScouter to incorporate 'fill_missing_tags' parameter in data processing. Adjusted related tests to ensure proper handling of missing tags, enhancing overall functionality and consistency across workflows.
2025-10-21 09:14:41 -03:00
vitor-aignosi
97eb5bc904 SIENTIAPDE-1316
Update .gitignore and refactor metrics.py, activities.py, and gates.py for improved clarity and consistency. Added coverage.xml and cache directories to .gitignore. Standardized string formatting and parameter handling in metrics and activities classes, enhancing code readability. Removed the deprecated faker.py file and adjusted related tests accordingly.
2025-10-16 13:31:12 -03:00
vitor-aignosi
199b1deacb SIENTIAPDE-1084
Update test_activities.py to change assertions for mock_postgres_close and mock_mongodb_close from assert_called_once to assert_called, allowing for more flexible verification of calls during shutdown tests.
2025-09-01 16:07:42 -03:00
vitor-aignosi
719e3917ab SIENTIAPDE-1193
Refactor Redis key format in tests for last data timestamp to use colons, enhancing readability and consistency with recent changes.
2025-08-25 09:03:03 -03:00
vitor-aignosi
826b559489 SIENTIAPDE-1193
Refactor CoreScouter workflow test to use updated DATETIME_FORMAT_WITH_TZ, ensuring consistency with recent changes in timestamp handling.
2025-08-22 15:44:13 -03:00
vitor-aignosi
96a28e91e5 SIENTIAPDE-1193
Enhance timestamp handling in Redis and CoreScouter workflows by updating to DATETIME_FORMAT_MS_WITH_TZ. Modify tests to reflect new timestamp format, ensuring consistency across data structures and improving overall datetime management.
2025-08-22 14:05:41 -03:00
vitor-aignosi
0e0603d2bc SIENTIAPDE-1193
Update sientia-dataops-library version to 1.4.3 and refactor timestamp handling in MongoDB and Redis activities to use DATETIME_FORMAT constants for improved consistency. Enhance unit tests to reflect these changes.
2025-08-22 11:12:37 -03:00
vitor-aignosi
552f58ca86 SIENTIAPDE-1169
SIENTIAPDE-1169 Update Redis and core scouter tests to include model_tags in data structures, enhancing data organization and consistency across test cases.
2025-08-19 09:29:46 -03:00
vitor-aignosi
40c57ed23d SIENTIAPDE-1174
Implement async test for write_metrics method in Gates activity, enhancing test coverage for metric logging functionality.
2025-08-01 07:40:06 -03:00
vitor-aignosi
2efad30304 SIENTIAPDE-1174
SIENTIAPDE-1174 Update dependencies, modify image tag, and enhance metrics tracking in various activities for improved observability and performance.
2025-07-31 12:52:07 -03:00
vitor-aignosi
f6913da932 SIENTIAPDE-1151
Enhance test cases in Gates and Redis activities by adding 'name' field to data and updating Redis TTL to 5 hours for better data retention.
2025-07-22 08:16:21 -03:00
vitor-aignosi
9580b6f8be SIENTIAPDE-1163
SIENTIAPDE-1163 Update test_redis.py to mock existing data in redis_activity.get for improved error handling in group and hold data tests.
2025-07-17 14:30:34 -03:00
vitor-aignosi
95defccbf6 SIENTIAPDE-1163
Refactor notification handler imports across multiple files to use CoreNotificationHandler instead of NotificationHandler for consistency and clarity.
2025-07-16 08:59:21 -03:00
vitor-aignosi
efeef628cb SIENTIAPDE-1148
Update sonar-project.properties to exclude worker.py from coverage, enhance error handling in worker.py, and add new tests for error scenarios in test_redis.py and test_mongo.py.
2025-07-11 12:32:23 -03:00
vitor-aignosi
6aa6071fce SIENTIAPDE-1110
Refactor test cases in test_gates.py to update filter configurations, extracting policy into a dictionary format for improved clarity and consistency in data quality gate tests.
2025-07-08 16:37:41 -03:00
vitor-aignosi
0b77a7bc7e SIENTIAPDE-1110
Implement store_data_package method in Redis activity for debug data storage. Update CoreScouter workflow to conditionally call store_data_package based on debug flag. Enhance tests for store_data_package functionality and error handling.
2025-07-07 10:03:08 -03:00
vitor-aignosi
08240efc8b SIENTIAPDE-1110
Enhance Gates and Redis activities by adding metadata parameter to apply_aggregation and notification methods. Refactor notification handling to use send_notification for improved consistency. Update tests to reflect changes in notification method calls and ensure proper functionality with new metadata integration.
2025-07-04 11:01:20 -03:00
vitor-aignosi
d08d1b1337 SIENTIAPDE-1110
Refactor Activities class to remove Kafka and Druid dependencies, simplifying initialization. Update values.yaml to set replica count to 1 for reduced resource usage. Adjust Redis activity to set TTL to None for better data retention. Remove unused Kafka and Druid activity files and their associated tests, streamlining the codebase.
2025-07-03 16:25:55 -03:00
vitor-aignosi
4a90b77786 SIENTIAPDE-1110
Update sientia-dataops-library version to 1.2.0 in requirements.txt; refactor logging in activities to use a unified Logger instance and include metadata in log messages across various activities.
2025-06-26 15:15:31 -03:00
vitor-aignosi
b8beb0e151 SIENTIAPDE-1094
Refactor Redis activity tests to improve initialization and assertion logic
2025-06-09 11:06:53 -03:00
vitor-aignosi
3759f10aec SIENTIAPDE-1094
Refactor test imports and remove unused test files
2025-06-09 10:37:06 -03:00
vitor-aignosi
cefb5e48ff SIENTIAPDE-1005
Unit test fixes
2025-05-19 15:52:39 -03:00
vitor-aignosi
03d62cb5f9 SIENTIAPDE-1005
Add initial implementation of data processing activities and filters
2025-05-19 15:02:30 -03:00
vitor-aignosi
9b715ea8c9 SIENTIAPDE-1005
Redis auth
2025-05-19 10:08:45 -03:00
vitor-aignosi
df8a0fc706 SIENTIAPDE-1005
Enhance README and configuration files; add Redis authentication and update workflows
2025-05-16 16:30:43 -03:00
vitor-aignosi
e252ca7962 SIENTIAPDE-1005
Full coverage

Refactor code structure and improve logging configuration; update tests for activities and connectors
2025-05-16 12:58:36 -03:00
vitor-aignosi
b203b7d22c SIENTIAPDE-1005
Implement workflows for fake data generation, scouter processing, and core scouter operations

- Added `FakeData` workflow to generate random data and send it to a Kafka topic.
- Implemented `Scouter` workflow to load data from Kafka and trigger the core scouter workflow.
- Created `CoreScouter` workflow to process data through quality gates, aggregation, and export to PostgreSQL.
- Developed comprehensive unit tests for activities and workflows, ensuring proper functionality and error handling.
- Enhanced Redis and Postgres activities with robust testing for data handling and error notifications.
- Introduced quality filters for data validation and implemented tests to verify their functionality.
2025-05-15 16:53:24 -03:00
vitor-aignosi
4e579dd5bd SIENTIAPDE-1005
Add initial implementation of data processing activities and filters
2025-05-13 16:58:03 -03:00