ipulse-shared-core-ftredge 2.57__py3-none-any.whl → 3.1.1__py3-none-any.whl

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 (24) hide show
  1. ipulse_shared_core_ftredge/__init__.py +9 -18
  2. ipulse_shared_core_ftredge/models/__init__.py +0 -1
  3. ipulse_shared_core_ftredge/models/organisation.py +61 -55
  4. ipulse_shared_core_ftredge/models/resource_catalog_item.py +97 -171
  5. ipulse_shared_core_ftredge/utils/__init__.py +3 -0
  6. ipulse_shared_core_ftredge/utils/utils_common.py +10 -0
  7. {ipulse_shared_core_ftredge-2.57.dist-info → ipulse_shared_core_ftredge-3.1.1.dist-info}/METADATA +5 -7
  8. ipulse_shared_core_ftredge-3.1.1.dist-info/RECORD +15 -0
  9. {ipulse_shared_core_ftredge-2.57.dist-info → ipulse_shared_core_ftredge-3.1.1.dist-info}/WHEEL +1 -1
  10. ipulse_shared_core_ftredge/enums/__init__.py +0 -29
  11. ipulse_shared_core_ftredge/enums/enums_common_utils.py +0 -177
  12. ipulse_shared_core_ftredge/enums/enums_data_eng.py +0 -44
  13. ipulse_shared_core_ftredge/enums/enums_module_fincore.py +0 -58
  14. ipulse_shared_core_ftredge/enums/enums_modules.py +0 -33
  15. ipulse_shared_core_ftredge/models/audit_log_firestore.py +0 -12
  16. ipulse_shared_core_ftredge/models/pulse_enums.py +0 -196
  17. ipulse_shared_core_ftredge/utils_custom_logs.py +0 -201
  18. ipulse_shared_core_ftredge/utils_gcp.py +0 -314
  19. ipulse_shared_core_ftredge/utils_gcp_for_pipelines.py +0 -201
  20. ipulse_shared_core_ftredge/utils_pipelinemon.py +0 -362
  21. ipulse_shared_core_ftredge/utils_templates_and_schemas.py +0 -153
  22. ipulse_shared_core_ftredge-2.57.dist-info/RECORD +0 -25
  23. {ipulse_shared_core_ftredge-2.57.dist-info → ipulse_shared_core_ftredge-3.1.1.dist-info}/LICENCE +0 -0
  24. {ipulse_shared_core_ftredge-2.57.dist-info → ipulse_shared_core_ftredge-3.1.1.dist-info}/top_level.txt +0 -0
@@ -1,177 +0,0 @@
1
-
2
- # pylint: disable=missing-module-docstring
3
- # pylint: disable=missing-function-docstring
4
- # pylint: disable=missing-class-docstring
5
- # pylint: disable=line-too-long
6
-
7
- from enum import Enum
8
-
9
-
10
- class SystemsImpacted(Enum):
11
- NO = "__no"
12
- YES = "__yes"
13
- INVESTIGATE = "__investigate"
14
- MULTIPLE = "__multiple"
15
- DB = "db"
16
- BQ_TABLE= "bq_table"
17
- BQ_TABLES = "bq_tables"
18
- GCS_BUCKET = "gcs_bucket"
19
- GCS_BUCKETS = "gcs_buckets"
20
- GCS_BUCKET_FILE = "gcs_bucket_file"
21
- GCS_BUCKET_FILES = "gcs_bucket_files"
22
- API = "api"
23
- APIS = "apis"
24
- LOCAL_FILE = "local_file"
25
- LOCAL_FILES = "local_files"
26
-
27
- class TargetLogs(Enum):
28
- MIXED="mixed_logs"
29
- SUCCESSES = "success_logs"
30
- NOTICES = "notice_logs"
31
- SUCCESSES_AND_NOTICES = "succs_n_notc_logs"
32
- WARNINGS = "warning_logs"
33
- WARNINGS_AND_ERRORS = "warn_n_err_logs"
34
- ERRORS = "error_logs"
35
-
36
- class LogLevel(Enum):
37
- """
38
- Standardized notice levels for data engineering pipelines,
39
- designed for easy analysis and identification of manual
40
- intervention needs.
41
- """
42
- DEBUG = 10 # Detailed debug information (for development/troubleshooting)
43
-
44
- INFO = 100
45
- INFO_REMOTE_PERSISTNACE_COMPLETE= 101
46
- INFO_REMOTE_UPDATE_COMPLETE = 102
47
- INFO_REMOTE_DELETE_COMPLETE = 103
48
-
49
- INFO_REMOTE_BULK_PERSISTNACE_COMPLETE= 111
50
- INFO_REMOTE_BULK_UPDATE_COMPLETE = 112
51
- INFO_REMOTE_BULK_DELETE_COMPLETE = 113
52
-
53
- INFO_LOCAL_PERSISTNACE_COMPLETE = 121
54
-
55
- SUCCESS = 201
56
- SUCCESS_WITH_NOTICES = 211
57
- SUCCESS_WITH_WARNINGS = 212
58
-
59
- NOTICE = 300 # Maybe same file or data already fully or partially exists
60
- NOTICE_ALREADY_EXISTS = 301 # Data already exists, no action required
61
- NOTICE_PARTIAL_EXISTS = 302 # Partial data exists, no action required
62
- NOTICE_ACTION_CANCELLED = 303 # Data processing cancelled, no action required
63
-
64
- # Warnings indicate potential issues that might require attention:
65
- WARNING = 400 # General warning, no immediate action required
66
- # WARNING_NO_ACTION = 401 # Minor issue or Unexpected Behavior, no immediate action required (can be logged frequently)
67
- WARNING_REVIEW_RECOMMENDED = 402 # Action recommended to prevent potential future issues
68
- WARNING_FIX_RECOMMENDED = 403 # Action recommended to prevent potential future issues
69
- WARNING_FIX_REQUIRED = 404 # Action required, pipeline can likely continue
70
-
71
- ERROR = 500 # General error, no immediate action required
72
-
73
- ERROR_EXCEPTION = 501
74
- ERROR_CUSTOM = 502 # Temporary error, automatic retry likely to succeed
75
- ERROR_OPERATION_PARTIALLY_FAILED = 511 # Partial or full failure, manual intervention required
76
- ERROR_OPERATION_FAILED = 512 # Operation failed, manual intervention required
77
- ERORR_OPERATION_WITH_WARNINGS = 513 # Partial or full failure, manual intervention required
78
- ERORR_OPERATION_WITH_ERRORS = 514 # Partial or full failure, manual intervention required
79
- ERORR_OPERATION_WITH_WARNINGS_OR_ERRORS = 515 # Partial or full failure, manual intervention required
80
-
81
- ERROR_THRESHOLD_REACHED = 551
82
- ERROR_PIPELINE_THRESHOLD_REACHED = 552 # Error due to threshold reached, no immediate action required
83
- ERROR_SUBTHRESHOLD_REACHED = 553 # Error due to threshold reached, no immediate action required
84
- ERROR_DATA_QUALITY_THRESHOLD_REACHED = 554 # Error due to threshold reached, no immediate action required
85
- # Critical errors indicate severe failures requiring immediate attention:
86
- CRITICAL=600 # General critical error, requires immediate action
87
- CRITICAL_SYSTEM_FAILURE = 601 # System-level failure (e.g., infrastructure, stackoverflow ), requires immediate action
88
-
89
- UNKNOWN=1001 # Unknown error, should not be used in normal operation
90
-
91
-
92
- class LogStatus(Enum):
93
- OPEN = "open"
94
- ACKNOWLEDGED = "acknowledged"
95
- IN_PROGRESS = "in_progress"
96
- RESOLVED = "resolved"
97
- IGNORED = "ignored"
98
- CANCELLED = "cancelled"
99
-
100
- ### Exception during full exection, partially saved
101
- # Exception during ensemble pipeline; modifications collected in local object , nothing persisted
102
- # Exception during ensemble pipeline; modifications persisted , metadata failed
103
- # Exception during ensemble pipeline; modifications persisted , metadata persisted
104
- # Exception during ensemble pipeline; modifications persisted , metadata persisted
105
-
106
-
107
- class Unit(Enum):
108
- MIX="MIX"
109
- # Currency and Financial Values
110
- USD = "USD" # United States Dollar
111
- EUR = "EUR" # Euro
112
- JPY = "JPY" # Japanese Yen
113
- GBP = "GBP" # British Pound Sterling
114
- AUD = "AUD" # Australian Dollar
115
- CAD = "CAD" # Canadian Dollar
116
- CHF = "CHF" # Swiss Franc
117
- CNY = "CNY" # Chinese Yuan Renminbi
118
- SEK = "SEK" # Swedish Krona
119
- NZD = "NZD" # New Zealand Dollar
120
- MXN = "MXN" # Mexican Peso
121
- SGD = "SGD" # Singapore Dollar
122
- HKD = "HKD" # Hong Kong Dollar
123
- NOK = "NOK" # Norwegian Krone
124
- KRW = "KRW" # South Korean Won
125
- RUB = "RUB" # Russian Ruble
126
- INR = "INR" # Indian Rupee
127
- BRL = "BRL" # Brazilian Real
128
- ZAR = "ZAR" # South African Rand
129
- CURRENCY = "currency" # General currency, when specific currency is not needed
130
-
131
- # Stock Market and Investments
132
- SHARES = "shares" # Number of shares
133
- PERCENT = "prcnt" # Percentage, used for rates and ratios
134
- BPS = "bps" # Basis points, often used for interest rates and financial ratios
135
-
136
- # Volume and Quantitative Measurements
137
- VOLUME = "volume" # Trading volume in units
138
- MILLIONS = "mills" # Millions, used for large quantities or sums
139
- BILLIONS = "bills" # Billions, used for very large quantities or sums
140
-
141
- # Commodity Specific Units
142
- BARRELS = "barrels" # Barrels, specifically for oil and similar liquids
143
- TONNES = "tonnes" # Tonnes, for bulk materials like metals or grains
144
- TROY_OUNCES = "troy_oz" # Troy ounces, specifically for precious metals
145
-
146
- # Real Estate and Physical Properties
147
- SQUARE_FEET = "sq_ft" # Square feet, for area measurement in real estate
148
- METER_SQUARE = "m2" # Square meters, for area measurement in real estate
149
- ACRES = "acres" # Acres, used for measuring large plots of land
150
-
151
- # Miscellaneous and Other Measures
152
- UNITS = "units" # Generic units, applicable when other specific units are not suitable
153
- COUNT = "count" # Count, used for tallying items or events
154
- INDEX_POINTS = "index_pnts" # Index points, used in measuring indices like stock market indices
155
- RATIO = "ratio" # Ratio, for various financial ratios
156
-
157
- class Frequency(Enum):
158
- ONE_MIN = "1min"
159
- FIVE_MIN="5min"
160
- FIFTEEN_MIN="15min"
161
- THIRTY_MIN = "30min"
162
- ONE_H = "1h"
163
- TWO_H = "2h"
164
- SIX_H = "6h"
165
- TWELVE_H = "12h"
166
- FOUR_H = "4h"
167
- EOD="eod"
168
- ONE_D = "1d"
169
- TWO_D = "2d"
170
- THREE_D = "3d"
171
- ONE_W = "1w"
172
- ONE_M = "1m"
173
- TWO_M="2m"
174
- THREE_M="3m"
175
- SIX_M="6m"
176
- ONE_Y="1y"
177
- THREE_Y="3y"
@@ -1,44 +0,0 @@
1
- # pylint: disable=missing-module-docstring
2
- # pylint: disable=missing-function-docstring
3
- # pylint: disable=missing-class-docstring
4
- from enum import Enum
5
-
6
- class SourcingTriggerType(Enum):
7
- BULK_MANUAL = "bulk_manual"
8
- BULK_SCHEDULED = "bulk_scheduled" # almost always historic bulk is manual
9
- RECENT_SCHEDULED = "recent_scheduled"
10
- RECENT_MANUAL = "recent_manual"
11
- ADHOC_MANUAL = "adhoc_manual"
12
- ADHOC_SCHEDULED = "adhoc_scheduled"
13
-
14
- class SourcingPipelineType(Enum):
15
- LOCAL_GET_API_TO_GCS = "local_get_api_to_gcs"
16
- LOCAL_GET_API_INMEMORY = "local_get_api_inmemory"
17
- LOCAL_GET_API_TO_LOCAL_FILE = "local_get_api_to_local_file"
18
- LOCAL_DOWNLOAD_WEB_FILE_TO_LOCAL = "local_download_web_file_to_local"
19
- LOCAL_DOWNLOAD_WEB_FILE_TO_GCS = "local_download_web_file_to_gcs"
20
- CLOUD_GET_API_TO_GCS = "cloud_get_api_to_gcs"
21
- CLOUD_GET_API_INMEMORY = "cloud_get_api_inmemory"
22
-
23
- class DWEventTriggerType(Enum):
24
- GCS_UPLOAD_TRIGGER_CF = "gcs_upload_trigger_cf"
25
- HTTP_TRIGGER_CF_FOR_GCS_FILE = "http_trigger_cf_for_gcs_file"
26
- PUBSUB_TRIGGER_CF_FOR_GCS_FILE = "pubsub_trigger_cf_for_gcs_file"
27
- LOCAL_SCRIPT_FOR_GCS_FILE = "local_script_for_gcs_file"
28
- INSIDE_SOURCING_FUNCTION = "inside_sourcing_function"
29
-
30
- class DWEvent(Enum):
31
- INSERT_NOREPLACE_1O_NT = "insert_noreplace_1o_nt"
32
- MERGE_NOREPLACE_NO_1T = "merge_noreplace_no_1t"
33
- MERGE_NOREPLACE_NO_NT = "merge_noreplace_no_nt"
34
- INSERT_NOREPLACE_1O_1T = "insert_noreplace_1o_1t"
35
- MERGE_NOREPLACE_1O_NT = "merge_noreplace_1o_nt"
36
- INSERT_REPLACE_1O_1T = "insert_replace_1o_1t"
37
- INSERT_REPLACE_1O_NT = "insert_replace_1o_nt"
38
- MERGE_REPLACE_NO_NT = "merge_replace_no_nt"
39
- MERGE_REPLACE_1O_NT = "merge_replace_1o_nt"
40
- MERGE_REPLACE_NO_1T = "merge_replace_no_1t"
41
- DELETE_1O_1T = "delete_1o_1t"
42
- DELETE_1O_NT = "delete_1o_nt"
43
- DELETE_NO_1T = "delete_no_1t"
44
- DELETE_NO_NT = "delete_no_nt"
@@ -1,58 +0,0 @@
1
- # pylint: disable=missing-module-docstring
2
- # pylint: disable=missing-function-docstring
3
- # pylint: disable=missing-class-docstring
4
- from enum import Enum
5
-
6
-
7
- class FinCoreCategory(Enum):
8
- MARKET="market" # Market prices data
9
- CORPORATE="corp" # Corporate data such as financial statements and earnings, similar to fundamental data
10
- FUNDAMENTAL="fundam"
11
- ECONOMY="economy"
12
- NEWS="news"
13
- SENTIMENT="sntmnt"
14
- SOCIAL="social"
15
- POLITICS="poltcs"
16
- OTHER="other"
17
-
18
- class FincCoreSubCategory(Enum):
19
- STOCKS = "stocks"
20
- BONDS = "bonds"
21
- COMMODITIES = "cmmdt"
22
- CURRENCIES = "crrncy"
23
- CRYPTOCURRENCIES = "crypto"
24
- REAL_ESTATE = "realest"
25
- EQUITY_INDICES = "eqindx"
26
- OPTIONS = "options"
27
- FUTURES = "futures"
28
- ETF = "etf"
29
- ECONOMIC_INDICATORS = "ecoind"
30
- FUNDAMENTALS = "fundam"
31
- OTHER = "othr"
32
-
33
- class FinCoreRecordsCategory(Enum):
34
- PRICE="pric"
35
- SPOT= "spot"
36
- OHLCVA="ohlcva"
37
- OHLCV="ohlcv"
38
- OPEN="open"
39
- HIGH="high"
40
- LOW="low"
41
- CLOSE="close"
42
- VOLUME="volume"
43
- ADJC="adjc"
44
- FUNDAMENTAL="fundam" # treat this differently
45
- EARNINGS="earnings"
46
- CASH_FLOW="cashflw"
47
- BALANCE_SHEET="blnce_sht"
48
- INTERNAL_TRANSACTIONS="internaltrans"
49
- INDICATORS="indic"
50
- ARTICLE="article"
51
- INSTA_POST="isntapost"
52
- TWEET="tweet"
53
- OTHER="othr"
54
-
55
- class ExchangeOrPublisher(Enum):
56
- CC="cc"
57
- US="us"
58
- NASDAQ="nasdaq"
@@ -1,33 +0,0 @@
1
-
2
- # pylint: disable=missing-module-docstring
3
- # pylint: disable=missing-function-docstring
4
- # pylint: disable=missing-class-docstring
5
- from enum import Enum
6
-
7
-
8
- class Module(Enum):
9
- CORE="core"
10
- ORACLE="oracle"
11
- PORTFOLIO="portfolio"
12
-
13
-
14
- ### DOMAIN : ORACLE
15
- class SubModule(Enum):
16
- FINCORE="fincore"
17
- GYMCORE="gymcore"
18
- SPORTSCORE="sportscore"
19
- HEALTHCORE="healthcore"
20
- ENVICORE="envicore"
21
- POLICORE="policore"
22
- CUSTOM="custom"
23
-
24
- class BaseDataCategory(Enum):
25
- HISTORIC = "historic" # Historical data, usually accurate and complete
26
- REAL_TIME="realtime" # Real-time data, not always certain, can have error
27
- ANALYTICS="analytics" # Analytical data andx modelling, derived from historical and prediction data
28
- PREDICTIVE="predictive" # Predictive data, based on models and simulations
29
- HISTORIC_OPINION="histopinion" # Opinions and subjective data about the past, msotly unverified but recorded facts and ideas
30
- SIMULATION_HISTORIC = "simhistoric" # Simulates past events
31
- SIMULATION_REAL_TIME = "simrealtime" # Simulates live data streams
32
- SIMULATION_ANALYTICS = "simanalytics" # Simulates live data streams
33
- SIMULATION_PREDICTIVE="simpredictive" # Simulated data, used for testing and training
@@ -1,12 +0,0 @@
1
- from pydantic import BaseModel
2
- from datetime import datetime
3
-
4
- class AuditLogFirestore(BaseModel):
5
- user_uid: str
6
- action: str
7
- collection_name: str
8
- document_name: str
9
- field_name: str
10
- old_value: str
11
- new_value: str
12
- timestamp: datetime
@@ -1,196 +0,0 @@
1
- resource_classifications = {
2
- "*",
3
- "childs_based", # Meaning need to look into child fields to determine classifications
4
-
5
- "public", #Anyone Can Access ex: synthetic data
6
- "authuser_open", # Any Authenticated Can Access ex: prices of gold, bitcoin etc.
7
- # "authuser_subscription",
8
- "authuser_confidential", ## Only User Owner Can Access and Specific Admin
9
- "authuser_limitedacl" , ## Has to be in the ACL
10
- "authuser_owner"
11
- "internal_open", ## Any Internal employees only Can Access ex: public reports, emails etc.
12
- "internal_sensitive", ## Many Internal employees Can Access IF meet special condition ex: internal financials summary reports , web and app analytics, list of admin users etc.
13
- "internal_confidential", ## Few Internal employees Can Access. ex: internal user data, key financials, salaries and bonuses etc
14
- "internal_limitedacl", ## Has to employee usertype and in the ACL
15
- "internal_owner"
16
- }
17
-
18
-
19
- resource_domain = {
20
- "*",
21
- ############### GYM #########
22
- "gym_domain",
23
- "gym_data_domain",
24
- "gym_ai_domain",
25
- ############## ORACLE #########
26
- "oracle_domain",
27
- "oracle_historic_prices_domain",
28
- "oracle_ai_domain",
29
- "oracle_assests_historic_info_domain",
30
- "oracle_historic_econometrics_domain",
31
- "oracle_news_historic_domain",
32
- "oracle_calendar_domain",
33
- "oracle_modelinfo_domain",
34
- "oracle_modelmetrics_domain",
35
- "oracle_modelpredictions_domain",
36
- ######### ORGANISATIONS #########
37
- "organisation_domain",
38
- ################### USER #########
39
- "user_domain",
40
- "user_management_domain",
41
- "user_portfolio_domain",
42
- "user_groups_and_roles_domain",
43
- ############### BUSINESS #########
44
- "business_domain",
45
- ############### ANALYTICS #########
46
- "analytics_domain",
47
- "system_domain"
48
- }
49
-
50
- resource_types = {
51
- "db", "sql_db", "nosql_db", "dynamodb",
52
- "big_query", "big_query_project", "big_query_table", "big_query_column",
53
- "big_query_row", "big_query_cell",
54
- "firestore", "firestore_project", "firestore_collection",
55
- "firestore_document","firestore_document_with_timeseries" "firestore_document_field",
56
- "pandas_dataframe", "spark_dataframe",
57
- "s3_bucket", "storage_bucket",
58
- "folder", "file", "json_file", "csv_file", "pdf_file",
59
- "unstructured_file", "image", "video", "audio", "text",
60
- "api", "report", "dashboard", "webpage", "website", "web"
61
- }
62
-
63
-
64
- pulse_modules={
65
- "*",
66
- "core",
67
- "gym",
68
- "orcl",
69
- "scen",
70
- "invs",
71
- "prfl",
72
- "trde",
73
- "bet",
74
- "chat"
75
- }
76
-
77
- organisation_relations = {
78
- "*",
79
- "retail_customer",
80
- "corporate_customer",
81
- "parent",
82
- "sister",
83
- "self",
84
- "partner",
85
- "supplier",
86
- "sponsor",
87
- "investor",
88
- "regulator",
89
- "other"
90
- }
91
-
92
- organisation_industries = {
93
- "*",
94
- "data",
95
- "government",
96
- "media",
97
- "academic",
98
- "commercial",
99
- "fund",
100
- "finance",
101
- "advisory",
102
- "hedgefund",
103
- "bank",
104
- "vc",
105
- "pe",
106
- "construction",
107
- "healthcare",
108
- "technology",
109
- "consulting",
110
- "retail",
111
- "non_profit",
112
- "individual",
113
- "freelancer",
114
- "other"
115
- }
116
-
117
- licences_types={
118
- "*",
119
- ######################################### OPEN or FULL Rights
120
- "public",
121
- "open",
122
- "open_no_tandc",
123
- "full_rights",
124
- "full_rights_for_sale",
125
- "commercial_licence_perpetual",
126
- "customer_private_tac",
127
- ######################################### SPECIAL CONDITIONS
128
- "open_with_tandc",
129
- "on_special_request",
130
- "commercial_licence_limited_time",
131
- "customer_owned_for_sale",
132
- ######################################### Not for Commercial Use
133
- "full_rights_not_for_sale",
134
- "internal_only",
135
- "academic_licence",
136
- "not_for_commercial_use",
137
- "customer_private"
138
- ######################################### Unknown
139
- "commercial_licence_not_purchased",
140
- "web_scrapped",
141
- "unknown"
142
- }
143
-
144
-
145
- actions ={"GET",
146
- "POST",
147
- "DELETE",
148
- "PUT",
149
- "create",
150
- "batch_create",
151
- "read",
152
- "batch_read",
153
- "edit",
154
- "batch_edit",
155
- "add",
156
- "batch_add",
157
- "remove",
158
- "batch_remove",
159
- "delete",
160
- "batch_delete",
161
- "rename" ,
162
- "batch_rename",
163
- "move",
164
- "batch_move",
165
- "download",
166
- "upload",
167
- "share"
168
- }
169
-
170
- resource_readable_by={
171
- "*",
172
- "all",
173
- "authenticated",
174
- "restircted",
175
- "owner",
176
- "selected_by_owner",
177
- "admin",
178
- "selected_by_admin",
179
- "super_admin",
180
- "super_admin_selected",
181
- "system"
182
- }
183
-
184
- resource_updatable_by={
185
- "*",
186
- "all",
187
- "authenticated",
188
- "restircted",
189
- "owner",
190
- "selected_by_owner",
191
- "admin",
192
- "selected_by_admin",
193
- "super_admin",
194
- "super_admin_selected",
195
- "system"
196
- }