ipulse-shared-core-ftredge 2.27__tar.gz → 2.29__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.

Files changed (29) hide show
  1. {ipulse_shared_core_ftredge-2.27/src/ipulse_shared_core_ftredge.egg-info → ipulse_shared_core_ftredge-2.29}/PKG-INFO +1 -1
  2. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/setup.py +1 -1
  3. ipulse_shared_core_ftredge-2.29/src/ipulse_shared_core_ftredge/__init__.py +12 -0
  4. ipulse_shared_core_ftredge-2.29/src/ipulse_shared_core_ftredge/enums/__init__.py +5 -0
  5. ipulse_shared_core_ftredge-2.29/src/ipulse_shared_core_ftredge/enums/enums_common.py +27 -0
  6. ipulse_shared_core_ftredge-2.29/src/ipulse_shared_core_ftredge/enums/enums_data_eng.py +40 -0
  7. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge/utils_templates_and_schemas.py +7 -14
  8. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29/src/ipulse_shared_core_ftredge.egg-info}/PKG-INFO +1 -1
  9. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge.egg-info/SOURCES.txt +3 -0
  10. ipulse_shared_core_ftredge-2.27/src/ipulse_shared_core_ftredge/__init__.py +0 -5
  11. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/LICENCE +0 -0
  12. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/README.md +0 -0
  13. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/pyproject.toml +0 -0
  14. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/setup.cfg +0 -0
  15. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge/models/__init__.py +0 -0
  16. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge/models/audit_log_firestore.py +0 -0
  17. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge/models/organisation.py +0 -0
  18. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge/models/pulse_enums.py +0 -0
  19. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge/models/resource_catalog_item.py +0 -0
  20. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge/models/user_auth.py +0 -0
  21. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge/models/user_profile.py +0 -0
  22. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge/models/user_profile_update.py +0 -0
  23. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge/models/user_status.py +0 -0
  24. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge/tests/__init__.py +0 -0
  25. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge/tests/test.py +0 -0
  26. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge/utils_gcp.py +0 -0
  27. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge.egg-info/dependency_links.txt +0 -0
  28. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/src/ipulse_shared_core_ftredge.egg-info/requires.txt +0 -0
  29. {ipulse_shared_core_ftredge-2.27 → ipulse_shared_core_ftredge-2.29}/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.27
3
+ Version: 2.29
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.27',
5
+ version='2.29',
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=[
@@ -0,0 +1,12 @@
1
+ from .models import (Organisation, UserAuth, UserProfile,
2
+ UserStatus, UserProfileUpdate, pulse_enums)
3
+ from .utils_gcp import (setup_gcp_logger_and_error_report,
4
+ read_csv_from_gcs, read_json_from_gcs,
5
+ write_csv_to_gcs, write_json_to_gcs)
6
+ from .utils_templates_and_schemas import (create_bigquery_schema_from_json,
7
+ update_check_with_schema_template)
8
+ from .enums import (NoticeSeverity,
9
+ SourcingPipelineType,
10
+ SourcingTriggerType,
11
+ DWEvents,
12
+ DWEventTriggerType )
@@ -0,0 +1,5 @@
1
+ from .enums_common import NoticeSeverity
2
+ from .enums_data_eng import (SourcingTriggerType,
3
+ SourcingPipelineType,
4
+ DWEvents,
5
+ DWEventTriggerType)
@@ -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
@@ -0,0 +1,40 @@
1
+ from enum import Enum, auto
2
+
3
+ class SourcingTriggerType(Enum):
4
+ HISTORIC_MANUAL = auto()
5
+ LIVE_SCHEDULED = auto()
6
+ ADHOC_MANUAL = auto()
7
+ ADHOC_SCHEDULED = auto()
8
+ LIVE_MANUAL = auto()
9
+
10
+ class SourcingPipelineType(Enum):
11
+ LOCAL_GET_API_TO_GCS_BUCKET_FILE = auto()
12
+ GCLOUD_GET_API_INMEMORY = auto()
13
+ LOCAL_GET_API_INMEMORY = auto()
14
+ GCLOUD_GET_API_TO_GCS_BUCKET_FILE = auto()
15
+ LOCAL_GET_API_TO_LOCAL_FILE = auto()
16
+ LOCAL_DOWNLOAD_WEB_FILE_TO_LOCAL = auto()
17
+ LOCAL_DOWNLOAD_WEB_FILE_UPLOAD_TO_GCS_BUCKET = auto()
18
+
19
+ class DWEventTriggerType(Enum):
20
+ GCS_BUCKET_FILE_UPLOAD = auto()
21
+ INSIDE_SOURCING_FUNCTION = auto()
22
+ MANUAL_FROM_GCS_BUCKET_FILE = auto()
23
+ MANUAL_FROM_LOCAL_FILE = auto()
24
+ PUBSUBC_TOPIC = auto()
25
+
26
+ class DWEvents(Enum):
27
+ INSERT_NOREPLACE_1A_NT = auto()
28
+ MERGE_NOREPLACE_NA_1T = auto()
29
+ MERGE_NOREPLACE_NA_NT = auto()
30
+ INSERT_NOREPLACE_1A_1T = auto()
31
+ MERGE_NOREPLACE_1A_NT = auto()
32
+ INSERT_REPLACE_1A_1T = auto()
33
+ INSERT_REPLACE_1A_NT = auto()
34
+ MERGE_REPL_NA_NT = auto()
35
+ MERGE_REPL_1A_NT = auto()
36
+ MERGE_REPL_NA_1T = auto()
37
+ DELETE_1A_1T = auto()
38
+ DELETE_1A_NT = auto()
39
+ DELETE_NA_1T = auto()
40
+ DELETE_NA_NT = auto()
@@ -1,5 +1,11 @@
1
- import datetime
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.27
3
+ Version: 2.29
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
@@ -10,6 +10,9 @@ src/ipulse_shared_core_ftredge.egg-info/SOURCES.txt
10
10
  src/ipulse_shared_core_ftredge.egg-info/dependency_links.txt
11
11
  src/ipulse_shared_core_ftredge.egg-info/requires.txt
12
12
  src/ipulse_shared_core_ftredge.egg-info/top_level.txt
13
+ src/ipulse_shared_core_ftredge/enums/__init__.py
14
+ src/ipulse_shared_core_ftredge/enums/enums_common.py
15
+ src/ipulse_shared_core_ftredge/enums/enums_data_eng.py
13
16
  src/ipulse_shared_core_ftredge/models/__init__.py
14
17
  src/ipulse_shared_core_ftredge/models/audit_log_firestore.py
15
18
  src/ipulse_shared_core_ftredge/models/organisation.py
@@ -1,5 +0,0 @@
1
- from .models import Organisation, UserAuth, UserProfile, UserStatus, UserProfileUpdate, pulse_enums
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, update_check_with_dict_template
4
-
5
-