sibi-dst 0.3.39__py3-none-any.whl → 0.3.40__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.
@@ -91,7 +91,7 @@ class DataWrapper:
91
91
  max_age_minutes: int = DEFAULT_MAX_AGE_MINUTES,
92
92
  history_days_threshold: int = DEFAULT_HISTORY_DAYS_THRESHOLD,
93
93
  show_progress: bool = False,
94
- timeout: float = 300):
94
+ timeout: float = 60):
95
95
  self.dataclass = dataclass
96
96
  self.date_field = date_field
97
97
  self.data_path = self.ensure_forward_slash(data_path)
@@ -158,16 +158,16 @@ class DataWrapper:
158
158
  """
159
159
  update_plan_table = self.generate_update_plan_with_conditions()
160
160
 
161
- # Display the update plan table to the user if requested
162
- if self.show_progress:
163
- display(update_plan_table)
164
-
165
161
  # Filter out rows that do not require updates (priority 0 means skip)
166
162
  with self._lock:
167
163
  update_plan_table = update_plan_table[
168
164
  (update_plan_table["update_required"] == True) & (update_plan_table["update_priority"] != 0)
169
165
  ]
170
-
166
+ # Display the update plan table to the user if requested
167
+ if len(update_plan_table.index) == 0:
168
+ return
169
+ if self.show_progress:
170
+ display(update_plan_table)
171
171
  # Group by priority
172
172
  with self._lock:
173
173
  priorities = sorted(update_plan_table["update_priority"].unique())
@@ -298,12 +298,16 @@ class DataWrapper:
298
298
  within_history = history_start_date <= current_date <= today
299
299
  missing_file = not file_exists and not self.ignore_missing
300
300
  category = None
301
+ update_required = False
301
302
 
302
303
  # Hierarchy 1: Overwrite
303
304
  if self.overwrite:
304
305
  category = "overwrite"
305
306
  update_required = True
306
- # Hierarchy 2: History threshold evaluation
307
+ elif missing_file and current_date < today:
308
+ category = "missing_files"
309
+ update_required = True
310
+
307
311
  elif within_history:
308
312
  if file_exists:
309
313
  if self.date_utils.is_file_older_than(
@@ -321,11 +325,6 @@ class DataWrapper:
321
325
  else:
322
326
  category = "missing_files"
323
327
  update_required = True
324
-
325
- # Hierarchy 3: Missing files
326
- elif missing_file and current_date <= today:
327
- category = "missing_files"
328
- update_required = True
329
328
  else:
330
329
  category = "No Update Required"
331
330
  update_required = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sibi-dst
3
- Version: 0.3.39
3
+ Version: 0.3.40
4
4
  Summary: Data Science Toolkit
5
5
  Author: Luis Valverde
6
6
  Author-email: lvalverdeb@gmail.com
@@ -42,7 +42,7 @@ sibi_dst/utils/airflow_manager.py,sha256=-d44EKUZNYJyp4wuNwRvilRQktunArPOB5fZuWd
42
42
  sibi_dst/utils/clickhouse_writer.py,sha256=syXGN9NG1FS8soHuMj6QNRqTRWi-thuYUF-_BWDc_KI,9883
43
43
  sibi_dst/utils/credentials.py,sha256=cHJPPsmVyijqbUQIq7WWPe-lIallA-mI5RAy3YUuRME,1724
44
44
  sibi_dst/utils/data_utils.py,sha256=j-lEKt6EJL2fm0z7adcjtVG7yFYLRpQL8xSgh2CVmJg,8769
45
- sibi_dst/utils/data_wrapper.py,sha256=SMmr4hwnUvCrN6nouI8N7aRiczuatjSMdYzNOBcDnr8,16283
45
+ sibi_dst/utils/data_wrapper.py,sha256=IT0cqQ9ur-AT28K_wFipW98qWom-lVGPYZomiwf5p7U,16283
46
46
  sibi_dst/utils/date_utils.py,sha256=UppOs1vfm41Si9JITAM7Qn9qqOi9yb6ukYz1E2mnA1I,19214
47
47
  sibi_dst/utils/df_utils.py,sha256=OFEtcwVKIilvf9qVf-IfIOHp4jcFAHX5l2IDGudhPZg,10989
48
48
  sibi_dst/utils/file_utils.py,sha256=JpsybYj3XvVJisSBeVU6YSaZnYRm4_6YWTI3TLnnY4Y,1257
@@ -50,6 +50,6 @@ sibi_dst/utils/filepath_generator.py,sha256=volVm0SSlBrtZp1RpTHxyui5rj5asNcVsWEB
50
50
  sibi_dst/utils/log_utils.py,sha256=XUbeXa1JsOlcEJyW8jnBlWo295rLUnuYi-HMzyhHwJg,3145
51
51
  sibi_dst/utils/parquet_saver.py,sha256=_QkXL3IiC2b4m7sxHpCSeqPwBWxXeiP5sH_WheSMEm4,8042
52
52
  sibi_dst/utils/storage_manager.py,sha256=-zlMrRo_6o6mCd_OHknKqNQl7m0I9VW89grDAUO1V5c,4229
53
- sibi_dst-0.3.39.dist-info/METADATA,sha256=SZJ04u1MedYe00Z3h_YexNMEzB2Nfd9BFyTdDXVX6ZM,2564
54
- sibi_dst-0.3.39.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
55
- sibi_dst-0.3.39.dist-info/RECORD,,
53
+ sibi_dst-0.3.40.dist-info/METADATA,sha256=LdS4HDtsN5ZWmG0BFwih-SS6W1hapmBVze258tEq5eM,2564
54
+ sibi_dst-0.3.40.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
55
+ sibi_dst-0.3.40.dist-info/RECORD,,