ipulse-shared-core-ftredge 2.22__tar.gz → 2.23__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 (25) hide show
  1. {ipulse_shared_core_ftredge-2.22/src/ipulse_shared_core_ftredge.egg-info → ipulse_shared_core_ftredge-2.23}/PKG-INFO +1 -1
  2. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/setup.py +1 -1
  3. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge/__init__.py +1 -1
  4. ipulse_shared_core_ftredge-2.23/src/ipulse_shared_core_ftredge/template_config_utils.py +32 -0
  5. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23/src/ipulse_shared_core_ftredge.egg-info}/PKG-INFO +1 -1
  6. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge.egg-info/SOURCES.txt +1 -0
  7. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/LICENCE +0 -0
  8. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/README.md +0 -0
  9. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/pyproject.toml +0 -0
  10. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/setup.cfg +0 -0
  11. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge/gcp_utils.py +0 -0
  12. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge/models/__init__.py +0 -0
  13. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge/models/audit_log_firestore.py +0 -0
  14. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge/models/organisation.py +0 -0
  15. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge/models/pulse_enums.py +0 -0
  16. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge/models/resource_catalog_item.py +0 -0
  17. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge/models/user_auth.py +0 -0
  18. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge/models/user_profile.py +0 -0
  19. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge/models/user_profile_update.py +0 -0
  20. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge/models/user_status.py +0 -0
  21. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge/tests/__init__.py +0 -0
  22. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge/tests/test.py +0 -0
  23. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge.egg-info/dependency_links.txt +0 -0
  24. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/src/ipulse_shared_core_ftredge.egg-info/requires.txt +0 -0
  25. {ipulse_shared_core_ftredge-2.22 → ipulse_shared_core_ftredge-2.23}/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.22
3
+ Version: 2.23
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.22',
5
+ version='2.23',
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,5 @@
1
1
  from .models import Organisation, UserAuth, UserProfile, UserStatus, UserProfileUpdate, pulse_enums
2
2
  from .gcp_utils import setup_gcp_logger_and_error_report, read_csv_from_gcs, read_json_from_gcs, write_csv_to_gcs, write_json_to_gcs
3
-
3
+ from .template_config_utils import full_update_template, partial_update_template
4
4
 
5
5
 
@@ -0,0 +1,32 @@
1
+ def full_update_template(template, updates, logger):
2
+ template_dict = template.copy()
3
+ filtered_updates = {k: v for k, v in updates.items() if k in template}
4
+ template_dict.update(filtered_updates)
5
+
6
+ # Log warnings for any fields in the template that are not updated
7
+ missing_fields = set(template.keys()) - set(filtered_updates.keys())
8
+ if missing_fields:
9
+ logger.warning(f"Fields in the template config but not updated: {missing_fields}")
10
+ # Log warnings for any fields in the updates that are not in the template
11
+ extra_fields = set(updates.keys()) - set(template.keys())
12
+ if extra_fields:
13
+ logger.warning(f"Fields in the updates extea to the template config: {extra_fields}. You probably forgot to update the Template Config. Do so now.")
14
+ if extra_fields:
15
+ raise ValueError(f"Updates contain fields not present in the template: {extra_fields}")
16
+
17
+ return template_dict
18
+
19
+ def partial_update_template(template, updates, logger):
20
+ template_dict = template.copy()
21
+ filtered_updates = {k: v for k, v in updates.items() if k in template}
22
+ template_dict.update(filtered_updates)
23
+
24
+ # Log warnings for any fields in the updates that are not in the template
25
+ extra_fields = set(updates.keys()) - set(template.keys())
26
+ if extra_fields:
27
+ logger.warning(f"Fields in the updates not in the template: {extra_fields}")
28
+
29
+ if extra_fields:
30
+ raise ValueError(f"Updates contain fields not present in the template: {extra_fields}")
31
+
32
+ return template_dict
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipulse_shared_core_ftredge
3
- Version: 2.22
3
+ Version: 2.23
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
@@ -4,6 +4,7 @@ pyproject.toml
4
4
  setup.py
5
5
  src/ipulse_shared_core_ftredge/__init__.py
6
6
  src/ipulse_shared_core_ftredge/gcp_utils.py
7
+ src/ipulse_shared_core_ftredge/template_config_utils.py
7
8
  src/ipulse_shared_core_ftredge.egg-info/PKG-INFO
8
9
  src/ipulse_shared_core_ftredge.egg-info/SOURCES.txt
9
10
  src/ipulse_shared_core_ftredge.egg-info/dependency_links.txt