ipulse-shared-core-ftredge 2.27__tar.gz → 2.28__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ipulse-shared-core-ftredge might be problematic. Click here for more details.
- {ipulse_shared_core_ftredge-2.27/src/ipulse_shared_core_ftredge.egg-info → ipulse_shared_core_ftredge-2.28}/PKG-INFO +1 -1
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/setup.py +1 -1
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge/__init__.py +2 -1
- ipulse_shared_core_ftredge-2.28/src/ipulse_shared_core_ftredge/enums_common.py +27 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge/utils_templates_and_schemas.py +7 -14
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28/src/ipulse_shared_core_ftredge.egg-info}/PKG-INFO +1 -1
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge.egg-info/SOURCES.txt +1 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/LICENCE +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/README.md +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/pyproject.toml +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/setup.cfg +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge/models/__init__.py +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge/models/audit_log_firestore.py +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge/models/organisation.py +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge/models/pulse_enums.py +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge/models/resource_catalog_item.py +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge/models/user_auth.py +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge/models/user_profile.py +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge/models/user_profile_update.py +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge/models/user_status.py +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge/tests/__init__.py +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge/tests/test.py +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge/utils_gcp.py +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge.egg-info/dependency_links.txt +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge.egg-info/requires.txt +0 -0
- {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.28}/src/ipulse_shared_core_ftredge.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ipulse_shared_core_ftredge
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.28
|
|
4
4
|
Summary: Shared Core models and Logger util for the Pulse platform project. Using AI for financial advisory and investment management.
|
|
5
5
|
Home-page: https://github.com/TheFutureEdge/ipulse_shared_core
|
|
6
6
|
Author: Russlan Ramdowar
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name='ipulse_shared_core_ftredge',
|
|
5
|
-
version='2.
|
|
5
|
+
version='2.28',
|
|
6
6
|
package_dir={'': 'src'}, # Specify the source directory
|
|
7
7
|
packages=find_packages(where='src'), # Look for packages in 'src'
|
|
8
8
|
install_requires=[
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from .models import Organisation, UserAuth, UserProfile, UserStatus, UserProfileUpdate, pulse_enums
|
|
2
2
|
from .utils_gcp import setup_gcp_logger_and_error_report, read_csv_from_gcs, read_json_from_gcs, write_csv_to_gcs, write_json_to_gcs
|
|
3
|
-
from .utils_templates_and_schemas import create_bigquery_schema_from_json,update_check_with_schema_template
|
|
3
|
+
from .utils_templates_and_schemas import create_bigquery_schema_from_json,update_check_with_schema_template
|
|
4
|
+
from .enums_common import NoticeSeverity
|
|
4
5
|
|
|
5
6
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
class NoticeSeverity(Enum):
|
|
4
|
+
"""
|
|
5
|
+
Standardized logging levels for data engineering pipelines,
|
|
6
|
+
designed for easy analysis and identification of manual
|
|
7
|
+
intervention needs.
|
|
8
|
+
"""
|
|
9
|
+
DEBUG = 100 # Detailed debug information (for development/troubleshooting)
|
|
10
|
+
INFO = 200 # Normal pipeline execution information
|
|
11
|
+
NOTICE = 300 # Events requiring attention, but not necessarily errors
|
|
12
|
+
|
|
13
|
+
# Warnings indicate potential issues that might require attention:
|
|
14
|
+
WARNING_NO_ACTION = 401 # Minor issue or Unexpected Behavior, no immediate action required (can be logged frequently)
|
|
15
|
+
WARNING_ACTION_RECOMMENDED = 402 # Action recommended to prevent potential future issues
|
|
16
|
+
WARNING_ACTION_REQUIRED = 403 # Action required, pipeline can likely continue
|
|
17
|
+
|
|
18
|
+
# Errors indicate a problem that disrupts normal pipeline execution:
|
|
19
|
+
ERROR_TRANSIENT_RETRY = 501 # Temporary error, automatic retry likely to succeed
|
|
20
|
+
ERROR_DATA_ISSUE_ISOLATED = 502 # Error likely caused by data issues, manual intervention likely needed
|
|
21
|
+
ERROR_DATA_ISSUE_WITH_DEPENDENCIES = 503 # Error likely in code/configuration, investigation required
|
|
22
|
+
ERROR_CONFIG_OR_CODE_ISSUE = 504 # Error likely in code/configuration, investigation required
|
|
23
|
+
ERROR_UNKNOWN_EXCEPTION = 505
|
|
24
|
+
|
|
25
|
+
# Critical errors indicate severe failures requiring immediate attention:
|
|
26
|
+
CRITICAL_SYSTEM_FAILURE = 601 # System-level failure (e.g., infrastructure), requires immediate action
|
|
27
|
+
CRITICAL_PIPELINE_FAILURE = 602 # Complete pipeline failure, requires investigation and potential rollback
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
# pylint: disable=missing-module-docstring
|
|
2
|
+
# pylint: disable=missing-function-docstring
|
|
3
|
+
# pylint: disable=logging-fstring-interpolation
|
|
4
|
+
# pylint: disable=line-too-long
|
|
5
|
+
|
|
6
|
+
import datetime
|
|
2
7
|
from google.cloud import bigquery
|
|
8
|
+
from . import NoticeSeverity
|
|
3
9
|
|
|
4
10
|
def create_bigquery_schema_from_json(json_schema):
|
|
5
11
|
schema = []
|
|
@@ -10,24 +16,11 @@ def create_bigquery_schema_from_json(json_schema):
|
|
|
10
16
|
schema.append(bigquery.SchemaField(field["name"], field["type"], mode=field["mode"]))
|
|
11
17
|
return schema
|
|
12
18
|
|
|
13
|
-
def update_check_with_dict_template(template, updates, logger):
|
|
14
|
-
template_dict = template.copy()
|
|
15
|
-
filtered_updates = {k: v for k, v in updates.items() if k in template}
|
|
16
|
-
template_dict.update(filtered_updates)
|
|
17
|
-
# Log warnings for any fields in the updates that are not in the template
|
|
18
|
-
extra_fields = set(updates.keys()) - set(template.keys())
|
|
19
|
-
if extra_fields:
|
|
20
|
-
logger.warning(f"Fields in the updates extra to the template config: {extra_fields}. You probably forgot to update the Template Config. Do so now.")
|
|
21
|
-
return template_dict
|
|
22
19
|
|
|
23
20
|
def update_check_with_schema_template(updates, schema, logger, dt_ts_to_str=True, check_max_length=True):
|
|
24
|
-
"""Ensure Update dict corresponds to the config schema, ensuring proper formats and lengths."""
|
|
25
|
-
valid_updates = {}
|
|
26
|
-
schema_dict = {field["name"]: field for field in schema}
|
|
27
21
|
|
|
28
22
|
"""Ensure Update dict corresponds to the config schema, ensuring proper formats and lengths."""
|
|
29
23
|
valid_updates = {}
|
|
30
|
-
schema_dict = {field["name"]: field for field in schema}
|
|
31
24
|
|
|
32
25
|
# Process updates to conform to the schema
|
|
33
26
|
for field in schema:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ipulse_shared_core_ftredge
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.28
|
|
4
4
|
Summary: Shared Core models and Logger util for the Pulse platform project. Using AI for financial advisory and investment management.
|
|
5
5
|
Home-page: https://github.com/TheFutureEdge/ipulse_shared_core
|
|
6
6
|
Author: Russlan Ramdowar
|
|
@@ -3,6 +3,7 @@ README.md
|
|
|
3
3
|
pyproject.toml
|
|
4
4
|
setup.py
|
|
5
5
|
src/ipulse_shared_core_ftredge/__init__.py
|
|
6
|
+
src/ipulse_shared_core_ftredge/enums_common.py
|
|
6
7
|
src/ipulse_shared_core_ftredge/utils_gcp.py
|
|
7
8
|
src/ipulse_shared_core_ftredge/utils_templates_and_schemas.py
|
|
8
9
|
src/ipulse_shared_core_ftredge.egg-info/PKG-INFO
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|