medicafe 0.250820.4__py3-none-any.whl → 0.250820.6__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.
@@ -3,7 +3,7 @@
3
3
  # Script Version: 2.0.2 (clean 3-try updater)
4
4
  # Target environment: Windows XP SP3 + Python 3.4.4 (ASCII-only)
5
5
 
6
- import sys, os, time, subprocess, platform
6
+ import sys, os, time, subprocess, platform, threading
7
7
 
8
8
  try:
9
9
  import requests
@@ -151,10 +151,96 @@ def check_internet_connection():
151
151
 
152
152
 
153
153
  # ---------- Upgrade logic (3 attempts, minimal delays) ----------
154
+ def _should_show_pip_line(text_line):
155
+ try:
156
+ # Show only useful progress lines to avoid noisy output
157
+ line = text_line.strip().lower()
158
+ keywords = [
159
+ 'collecting', 'downloading', 'installing', 'building',
160
+ 'successfully installed', 'successfully built',
161
+ 'requirement already satisfied', 'uninstalling', 'preparing',
162
+ 'error', 'warning'
163
+ ]
164
+ for kw in keywords:
165
+ if kw in line:
166
+ return True
167
+ except Exception:
168
+ pass
169
+ return False
170
+
171
+
172
+ def _start_heartbeat(label):
173
+ # Prints a simple heartbeat every 10 seconds while a subprocess runs
174
+ stop_event = threading.Event()
175
+ start_ts = time.time()
176
+
177
+ def _runner():
178
+ last_emitted = -1
179
+ while not stop_event.is_set():
180
+ try:
181
+ elapsed = int(time.time() - start_ts)
182
+ if elapsed >= 10 and elapsed // 10 != last_emitted:
183
+ last_emitted = elapsed // 10
184
+ print_status('INFO', '{}... {}s elapsed'.format(label, elapsed))
185
+ try:
186
+ sys.stdout.flush()
187
+ except Exception:
188
+ pass
189
+ except Exception:
190
+ # Never fail due to heartbeat issues
191
+ pass
192
+ time.sleep(1)
193
+
194
+ t = threading.Thread(target=_runner)
195
+ t.daemon = True
196
+ t.start()
197
+ return stop_event
198
+
199
+
154
200
  def run_pip_install(args):
155
- proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
156
- out, err = proc.communicate()
157
- return proc.returncode, out.decode(), err.decode()
201
+ # Stream stdout live (stderr merged) with periodic heartbeat
202
+ try:
203
+ proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
204
+ except Exception:
205
+ # Fallback to legacy behavior if streaming spawn fails for any reason
206
+ proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
207
+ out, err = proc.communicate()
208
+ try:
209
+ return proc.returncode, out.decode(errors='ignore'), err.decode(errors='ignore')
210
+ except Exception:
211
+ return proc.returncode, '', ''
212
+
213
+ heartbeat = _start_heartbeat('Installer running')
214
+ out_lines = []
215
+ try:
216
+ while True:
217
+ chunk = proc.stdout.readline()
218
+ if not chunk:
219
+ if proc.poll() is not None:
220
+ break
221
+ # Small sleep to avoid tight loop if no data
222
+ time.sleep(0.1)
223
+ continue
224
+ try:
225
+ text = chunk.decode(errors='ignore').replace('\r', '')
226
+ except Exception:
227
+ text = ''
228
+ out_lines.append(text)
229
+ if _should_show_pip_line(text):
230
+ try:
231
+ # Print selected progress lines immediately
232
+ print(text.strip())
233
+ sys.stdout.flush()
234
+ except Exception:
235
+ pass
236
+ finally:
237
+ try:
238
+ heartbeat.set()
239
+ except Exception:
240
+ pass
241
+
242
+ # With stderr merged into stdout, return empty err string
243
+ return proc.returncode, ''.join(out_lines), ''
158
244
 
159
245
 
160
246
  def verify_post_install(package, expected_version):
@@ -208,9 +294,17 @@ def upgrade_package(package):
208
294
  print_status('WARNING', 'Install returned success but version not updated yet{}'.format(
209
295
  '' if not installed else ' (detected {})'.format(installed)))
210
296
  else:
211
- # Show error output concisely
297
+ # Show error output concisely; if stderr empty (merged), show tail of stdout
212
298
  if err:
213
299
  print(err.strip())
300
+ elif out:
301
+ try:
302
+ lines = out.strip().splitlines()
303
+ tail = '\n'.join(lines[-15:])
304
+ if tail:
305
+ print(tail)
306
+ except Exception:
307
+ pass
214
308
  # Detect extras error and fall back to non-binary package
215
309
  if 'Invalid requirement' in err or 'extras' in err or '[binary]' in err:
216
310
  print_status('INFO', 'Falling back to installing without [binary] extra')
@@ -223,6 +317,14 @@ def upgrade_package(package):
223
317
  return True
224
318
  if err2:
225
319
  print(err2.strip())
320
+ elif out2:
321
+ try:
322
+ lines2 = out2.strip().splitlines()
323
+ tail2 = '\n'.join(lines2[-15:])
324
+ if tail2:
325
+ print(tail2)
326
+ except Exception:
327
+ pass
226
328
  print_status('WARNING', 'pip returned non-zero exit code ({})'.format(code))
227
329
 
228
330
  return False
MediCafe/__init__.py CHANGED
@@ -27,7 +27,7 @@ Smart Import System:
27
27
  api_suite = get_api_access()
28
28
  """
29
29
 
30
- __version__ = "0.250820.4"
30
+ __version__ = "0.250820.6"
31
31
  __author__ = "Daniel Vidaud"
32
32
  __email__ = "daniel@personalizedtransformation.com"
33
33
 
MediLink/__init__.py CHANGED
@@ -22,7 +22,7 @@ Smart Import Integration:
22
22
  datamgmt = get_components('medilink_datamgmt')
23
23
  """
24
24
 
25
- __version__ = "0.250820.4"
25
+ __version__ = "0.250820.6"
26
26
  __author__ = "Daniel Vidaud"
27
27
  __email__ = "daniel@personalizedtransformation.com"
28
28
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: medicafe
3
- Version: 0.250820.4
3
+ Version: 0.250820.6
4
4
  Summary: MediCafe
5
5
  Home-page: https://github.com/katanada2/MediCafe
6
6
  Author: Daniel Vidaud
@@ -1,21 +1,28 @@
1
1
  MediBot/MediBot.bat,sha256=ZXYeUopUwsFsrk47aZiqFWVrttemjwz3vlDnKhjG76s,27120
2
- MediBot/MediBot.py,sha256=Kto3af79nWYndoPmStJK3KjyyUq2pAXXUb5ETBBtqRs,46326
2
+ MediBot/MediBot.py,sha256=j6yGetDQxonIepD_J-bJ5L_WiW9XRxOkIHiVAM_blfE,47083
3
3
  MediBot/MediBot_Charges.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  MediBot/MediBot_Crosswalk_Library.py,sha256=jIaYdoxfT9YgQ5dWZC4jmTYxRX1Y14X-AJ6YEjR58Gc,25158
5
5
  MediBot/MediBot_Crosswalk_Utils.py,sha256=hTLPioU9A5XfdTZ7LqeOiYXdsi8Bwf9fuMJGxofyTmg,38983
6
+ MediBot/MediBot_Notepad_Utils.py,sha256=fOsjyfoSpgmQyc8TcnLm53faLMOUUL18cspo5PZqJK4,8719
6
7
  MediBot/MediBot_Post.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
8
  MediBot/MediBot_Preprocessor.py,sha256=gQRVAWbRHx_PMK6a7q93tp7Z-Dhjn5r0lJz3d0wAzeU,19067
8
9
  MediBot/MediBot_Preprocessor_lib.py,sha256=lyl2Q5V1MQHiZ54kmTYPxor3pm2gf8mAq-IwYu7FX2c,87236
9
10
  MediBot/MediBot_UI.py,sha256=iG8UK71aHYBmB0lkjwl-C6L9DbsOyLaq-wt9kChV0jo,23781
10
11
  MediBot/MediBot_dataformat_library.py,sha256=D46fdPtxcgfWTzaLBtSvjtozzZBNqNiODgu4vKMZrBg,10746
12
+ MediBot/MediBot_debug.bat,sha256=F5Lfi3nFEEo4Ddx9EbX94u3fNAMgzMp3wsn-ULyASTM,6017
11
13
  MediBot/MediBot_docx_decoder.py,sha256=gn7I7Ng5khVIzU0HTTOqi31YSSn1yW8Pyk-i_P9r1oA,32472
12
14
  MediBot/MediBot_smart_import.py,sha256=Emvz7NwemHGCHvG5kZcUyXMcCheidbGKaPfOTg-YCEs,6684
13
- MediBot/__init__.py,sha256=MOV0GUtSwpkULNy3D2klNIbH79RjZVGmJKvJZfG5u4E,3192
15
+ MediBot/__init__.py,sha256=eRsRz2bCAdEA8aRI5pPC45sBqvsaxfAdH7DQC0UpS74,3192
16
+ MediBot/clear_cache.bat,sha256=F6-VhETWw6xDdGWG2wUqvtXjCl3lY4sSUFqF90bM8-8,1860
17
+ MediBot/crash_diagnostic.bat,sha256=j8kUtyBg6NOWbXpeFuEqIRHOkVzgUrLOqO3FBMfNxTo,9268
18
+ MediBot/f_drive_diagnostic.bat,sha256=4572hZaiwZ5wVAarPcZJQxkOSTwAdDuT_X914noARak,6878
19
+ MediBot/full_debug_suite.bat,sha256=b3Euz-VbRaPE6tWmgpjApfv4_cB5-Rk8BLNlLrp2bpo,2223
14
20
  MediBot/get_medicafe_version.py,sha256=uyL_UIE42MyFuJ3SRYxJp8sZx8xjTqlYZ3FdQuxLduY,728
21
+ MediBot/process_csvs.bat,sha256=4PnwLyLRqwZ_rIsd6MvtwOI21MDKKm4HMzNgFwvpPG0,3339
15
22
  MediBot/update_json.py,sha256=vvUF4mKCuaVly8MmoadDO59M231fCIInc0KI1EtDtPA,3704
16
- MediBot/update_medicafe.py,sha256=_-5a1oFUbJ4vQvMgG8FJpL2X8hDuthMEcAD8c4R8YIg,12487
23
+ MediBot/update_medicafe.py,sha256=J5ktFGq6gTsov0NCrMhq3nmyiiIsUqnH28LoeDWg-hg,16072
17
24
  MediCafe/MediLink_ConfigLoader.py,sha256=fNBFnPbh1YRVCs9WvZp6tPsKTUFzK3f38ePeUQ00QrQ,10161
18
- MediCafe/__init__.py,sha256=vz7Em09YxT-nB5Au2GRWw-pc-5pPefETQpvDUJp_UjQ,5721
25
+ MediCafe/__init__.py,sha256=SFQi_kGsBa_haGw0hHg7md1ErHxM1NcuvyolEcXIidw,5721
19
26
  MediCafe/__main__.py,sha256=mRNyk3D9Ilnu2XhgVI_rut7r5Ro7UIKtwV871giAHI8,12992
20
27
  MediCafe/api_core.py,sha256=IZaBXnP4E7eHzxVbCk2HtxywiVBuhaUyHeaqss8llgY,66378
21
28
  MediCafe/api_core_backup.py,sha256=Oy_Fqt0SEvGkQN1Oqw5iUPVFxPEokyju5CuPEb9k0OY,18686
@@ -54,7 +61,7 @@ MediLink/MediLink_insurance_utils.py,sha256=g741Fj2K26cMy0JX5d_XavMw9LgkK6hjaUJY
54
61
  MediLink/MediLink_main.py,sha256=ZVK2UsgSxC9UqgIYfgVu95ugULcH6-11l67jsf4vdJc,22132
55
62
  MediLink/MediLink_smart_import.py,sha256=B5SfBn_4bYEWJJDolXbjnwKx_-MaqGZ76LyXQwWDV80,9838
56
63
  MediLink/Soumit_api.py,sha256=5JfOecK98ZC6NpZklZW2AkOzkjvrbYxpJpZNH3rFxDw,497
57
- MediLink/__init__.py,sha256=c6_4VjVQvYyNgSf7YLqeC4S-5xTvMjJwzMs9sKeFTYU,3888
64
+ MediLink/__init__.py,sha256=FNXbuB0evwhJciZtEiX3-zMrMDtyHwji1jdojfL_lAA,3888
58
65
  MediLink/gmail_http_utils.py,sha256=gtqCCrzJC7e8JFQzMNrf7EbK8na2h4sfTu-NMaZ_UHc,4006
59
66
  MediLink/gmail_oauth_utils.py,sha256=Ugr-DEqs4_RddRMSCJ_dbgA3TVeaxpbAor-dktcTIgY,3713
60
67
  MediLink/insurance_type_integration_test.py,sha256=pz2OCXitAznqDciYn6OL9M326m9CYU7YiK-ynssdQ5g,15172
@@ -64,9 +71,9 @@ MediLink/test_cob_library.py,sha256=wUMv0-Y6fNsKcAs8Z9LwfmEBRO7oBzBAfWmmzwoNd1g,
64
71
  MediLink/test_timing.py,sha256=yH2b8QPLDlp1Zy5AhgtjzjnDHNGhAD16ZtXtZzzESZw,2042
65
72
  MediLink/test_validation.py,sha256=FJrfdUFK--xRScIzrHCg1JeGdm0uJEoRnq6CgkP2lwM,4154
66
73
  MediLink/webapp.html,sha256=JPKT559aFVBi1r42Hz7C77Jj0teZZRumPhBev8eSOLk,19806
67
- medicafe-0.250820.4.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
68
- medicafe-0.250820.4.dist-info/METADATA,sha256=SL3WeSi_2LATp4gCRY9l5x6j50rB7fZgd5eToErvnHc,3414
69
- medicafe-0.250820.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
70
- medicafe-0.250820.4.dist-info/entry_points.txt,sha256=m3RBUBjr-xRwEkKJ5W4a7NlqHZP_1rllGtjZnrRqKe8,52
71
- medicafe-0.250820.4.dist-info/top_level.txt,sha256=U6-WBJ9RCEjyIs0BlzbQq_PwedCp_IV9n1616NNV5zA,26
72
- medicafe-0.250820.4.dist-info/RECORD,,
74
+ medicafe-0.250820.6.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
75
+ medicafe-0.250820.6.dist-info/METADATA,sha256=x6i0ZhWF8BsF6Ans7lBeisEeciKArw7MHB6-qxgbHNU,3414
76
+ medicafe-0.250820.6.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
77
+ medicafe-0.250820.6.dist-info/entry_points.txt,sha256=m3RBUBjr-xRwEkKJ5W4a7NlqHZP_1rllGtjZnrRqKe8,52
78
+ medicafe-0.250820.6.dist-info/top_level.txt,sha256=U6-WBJ9RCEjyIs0BlzbQq_PwedCp_IV9n1616NNV5zA,26
79
+ medicafe-0.250820.6.dist-info/RECORD,,