trovesuite 1.0.24__tar.gz → 1.0.26__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.
Files changed (43) hide show
  1. {trovesuite-1.0.24/src/trovesuite.egg-info → trovesuite-1.0.26}/PKG-INFO +1 -1
  2. {trovesuite-1.0.24 → trovesuite-1.0.26}/pyproject.toml +2 -2
  3. {trovesuite-1.0.24 → trovesuite-1.0.26}/setup.py +1 -1
  4. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/configs/database.py +6 -10
  5. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/configs/settings.py +1 -4
  6. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/utils/helper.py +6 -5
  7. {trovesuite-1.0.24 → trovesuite-1.0.26/src/trovesuite.egg-info}/PKG-INFO +1 -1
  8. {trovesuite-1.0.24 → trovesuite-1.0.26}/LICENSE +0 -0
  9. {trovesuite-1.0.24 → trovesuite-1.0.26}/MANIFEST.in +0 -0
  10. {trovesuite-1.0.24 → trovesuite-1.0.26}/README.md +0 -0
  11. {trovesuite-1.0.24 → trovesuite-1.0.26}/requirements.txt +0 -0
  12. {trovesuite-1.0.24 → trovesuite-1.0.26}/setup.cfg +0 -0
  13. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/__init__.py +0 -0
  14. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/auth/__init__.py +0 -0
  15. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/auth/auth_base.py +0 -0
  16. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/auth/auth_controller.py +0 -0
  17. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/auth/auth_read_dto.py +0 -0
  18. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/auth/auth_service.py +0 -0
  19. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/auth/auth_write_dto.py +0 -0
  20. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/configs/__init__.py +0 -0
  21. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/configs/logging.py +0 -0
  22. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/entities/__init__.py +0 -0
  23. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/entities/health.py +0 -0
  24. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/entities/sh_response.py +0 -0
  25. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/notification/__init__.py +0 -0
  26. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/notification/notification_base.py +0 -0
  27. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/notification/notification_controller.py +0 -0
  28. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/notification/notification_read_dto.py +0 -0
  29. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/notification/notification_service.py +0 -0
  30. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/notification/notification_write_dto.py +0 -0
  31. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/storage/__init__.py +0 -0
  32. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/storage/storage_base.py +0 -0
  33. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/storage/storage_controller.py +0 -0
  34. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/storage/storage_read_dto.py +0 -0
  35. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/storage/storage_service.py +0 -0
  36. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/storage/storage_write_dto.py +0 -0
  37. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/utils/__init__.py +0 -0
  38. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite/utils/templates.py +0 -0
  39. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite.egg-info/SOURCES.txt +0 -0
  40. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite.egg-info/dependency_links.txt +0 -0
  41. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite.egg-info/not-zip-safe +0 -0
  42. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite.egg-info/requires.txt +0 -0
  43. {trovesuite-1.0.24 → trovesuite-1.0.26}/src/trovesuite.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trovesuite
3
- Version: 1.0.24
3
+ Version: 1.0.26
4
4
  Summary: TroveSuite services package providing authentication, authorization, notifications, Azure Storage, and other enterprise services for TroveSuite applications
5
5
  Home-page: https://dev.azure.com/brightgclt/trovesuite/_git/packages
6
6
  Author: Bright Debrah Owusu
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "trovesuite"
7
- version = "1.0.24"
7
+ version = "1.0.26"
8
8
  description = "TroveSuite services package providing authentication, authorization, notifications, Azure Storage, and other enterprise services for TroveSuite applications"
9
9
  authors = ["brightgclt <brightgclt@gmail.com>"]
10
10
  license = "MIT"
@@ -58,7 +58,7 @@ Documentation = "https://dev.azure.com/brightgclt/trovesuite/_git/packages"
58
58
 
59
59
  [project]
60
60
  name = "trovesuite"
61
- version = "1.0.24"
61
+ version = "1.0.26"
62
62
  description = "TroveSuite services package providing authentication, authorization, notifications, Azure Storage, and other enterprise services for TroveSuite applications"
63
63
  readme = "README.md"
64
64
  license = {text = "MIT"}
@@ -15,7 +15,7 @@ with open("pyproject.toml", "r", encoding="utf-8") as fh:
15
15
 
16
16
  setup(
17
17
  name="trovesuite",
18
- version="1.0.24",
18
+ version="1.0.26",
19
19
  author="Bright Debrah Owusu",
20
20
  author_email="owusu.debrah@deladetech.com",
21
21
  description="TroveSuite services package providing authentication, authorization, notifications, and other enterprise services for TroveSuite applications",
@@ -303,13 +303,9 @@ class DatabaseManager:
303
303
  }
304
304
 
305
305
 
306
- # Database initialization on module import
307
- try:
308
- initialize_database()
309
- except Exception as e:
310
- logger.error(f"Failed to initialize database on startup: {str(e)}")
311
- logger.error("⚠️ CRITICAL: Application started without database connection!")
312
- logger.error("⚠️ Please check your .env file and database configuration")
313
- logger.error("⚠️ The application will not function properly without a database connection")
314
- # Don't raise here to allow the app to start even if DB is unavailable
315
- # But log it clearly so it's obvious what's wrong
306
+ # NOTE: Database initialization is NOT automatic
307
+ # You must call initialize_database() explicitly in your application startup
308
+ # Example in FastAPI:
309
+ # @app.on_event("startup")
310
+ # async def startup_event():
311
+ # initialize_database()
@@ -38,13 +38,11 @@ class Settings:
38
38
  # SHARED TABLES (core_platform schema)
39
39
  # =============================================================================
40
40
  CORE_PLATFORM_TENANTS_TABLE = os.getenv("CORE_PLATFORM_TENANTS_TABLE", "core_platform.cp_tenants")
41
- CORE_PLATFORM_TENANT_RESOURCE_ID_TABLE = os.getenv("CORE_PLATFORM_TENANT_RESOURCE_ID_TABLE", "core_platform.cp_resource_ids")
42
41
  CORE_PLATFORM_SUBSCRIPTIONS_TABLE = os.getenv("CORE_PLATFORM_SUBSCRIPTIONS_TABLE", "core_platform.cp_subscriptions")
43
42
  CORE_PLATFORM_APPS_TABLE = os.getenv("CORE_PLATFORM_APPS_TABLE", "core_platform.cp_apps")
44
43
  CORE_PLATFORM_USERS_TABLE = os.getenv("CORE_PLATFORM_USERS_TABLE", "core_platform.cp_users")
45
44
  CORE_PLATFORM_RESOURCE_TYPES_TABLE = os.getenv("CORE_PLATFORM_RESOURCE_TYPES_TABLE", "core_platform.cp_resource_types")
46
- CORE_PLATFORM_RESOURCE_ID_TABLE = os.getenv("CORE_PLATFORM_RESOURCE_ID_TABLE", "core_platform.cp_shared_resource_ids")
47
- CORE_PLATFORM_RESOURCES_TABLE = os.getenv("CORE_PLATFORM_RESOURCES_TABLE", "core_platform.resources")
45
+ CORE_PLATFORM_RESOURCE_ID_TABLE = os.getenv("CORE_PLATFORM_RESOURCE_ID_TABLE", "core_platform.cp_resource_ids")
48
46
  CORE_PLATFORM_PERMISSIONS_TABLE = os.getenv("CORE_PLATFORM_PERMISSIONS_TABLE", "core_platform.cp_permissions")
49
47
  CORE_PLATFORM_ROLES_TABLE = os.getenv("CORE_PLATFORM_ROLES_TABLE", "core_platform.cp_roles")
50
48
  CORE_PLATFORM_ROLE_PERMISSIONS_TABLE = os.getenv("CORE_PLATFORM_ROLE_PERMISSIONS_TABLE", "core_platform.cp_role_permissions")
@@ -69,7 +67,6 @@ class Settings:
69
67
  CORE_PLATFORM_LOGIN_SETTINGS_TABLE = os.getenv("CORE_PLATFORM_LOGIN_SETTINGS_TABLE", "core_platform.cp_login_settings")
70
68
  CORE_PLATFORM_RESOURCES_TABLE = os.getenv("CORE_PLATFORM_RESOURCES_TABLE", "core_platform.cp_resources")
71
69
  CORE_PLATFORM_ASSIGN_ROLES_TABLE = os.getenv("CORE_PLATFORM_ASSIGN_ROLES_TABLE", "core_platform.cp_assign_roles")
72
- CORE_PLATFORM_RESOURCE_ID_TABLE = os.getenv("CORE_PLATFORM_RESOURCE_ID_TABLE", "core_platform.cp_resource_ids")
73
70
  CORE_PLATFORM_SUBSCRIPTION_HISTORY_TABLE = os.getenv("CORE_PLATFORM_SUBSCRIPTION_HISTORY_TABLE", "core_platform.cp_user_subscription_histories")
74
71
  CORE_PLATFORM_RESOURCE_DELETION_CHAT_HISTORY_TABLE = os.getenv("CORE_PLATFORM_RESOURCE_DELETION_CHAT_HISTORY_TABLE", "core_platform.cp_resource_deletion_chat_histories")
75
72
  CORE_PLATFORM_USER_GROUPS_TABLE = os.getenv("CORE_PLATFORM_USER_GROUPS_TABLE", "core_platform.cp_user_groups")
@@ -96,11 +96,12 @@ class Helper:
96
96
 
97
97
  try:
98
98
  if tenant_id:
99
- # For tenant-specific resource IDs, check shared schema with tenant_id filter
100
- tenant_resource_table = getattr(db_settings, 'CORE_PLATFORM_TENANT_RESOURCE_ID_TABLE', None) or getattr(db_settings, 'CORE_PLATFORM_RESOURCE_ID_TABLE', None)
101
- if tenant_resource_table:
99
+ # For tenant-specific resource IDs, use CORE_PLATFORM_RESOURCE_ID_TABLE
100
+ # This table has tenant_id column for filtering
101
+ resource_table = getattr(db_settings, 'CORE_PLATFORM_RESOURCE_ID_TABLE', None)
102
+ if resource_table:
102
103
  resource_exists = DatabaseManager.execute_scalar(
103
- f"""SELECT COUNT(1) FROM {tenant_resource_table}
104
+ f"""SELECT COUNT(1) FROM {resource_table}
104
105
  WHERE tenant_id = %s AND id = %s""",
105
106
  (tenant_id, candidate,),
106
107
  )
@@ -108,7 +109,7 @@ class Helper:
108
109
  # Fallback: assume no conflict if table not configured
109
110
  resource_exists = 0
110
111
  else:
111
- # For main schema resource IDs
112
+ # For main/shared schema resource IDs (no tenant_id)
112
113
  main_resource_table = getattr(db_settings, 'CORE_PLATFORM_RESOURCE_ID_TABLE', None)
113
114
  if main_resource_table:
114
115
  resource_exists = DatabaseManager.execute_scalar(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trovesuite
3
- Version: 1.0.24
3
+ Version: 1.0.26
4
4
  Summary: TroveSuite services package providing authentication, authorization, notifications, Azure Storage, and other enterprise services for TroveSuite applications
5
5
  Home-page: https://dev.azure.com/brightgclt/trovesuite/_git/packages
6
6
  Author: Bright Debrah Owusu
File without changes
File without changes
File without changes
File without changes