radboy 0.0.573__py3-none-any.whl → 0.0.574__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 radboy might be problematic. Click here for more details.

@@ -280,7 +280,8 @@ class HealthLogUi:
280
280
  return
281
281
  elif useDateRange in ['d',]:
282
282
  useDateRange=True
283
- output=Path("HealthLogAll.xlsx")
283
+ fil=Path("HealthLogAll.xlsx")
284
+ output=pd.ExcelWriter(fil)
284
285
  with Session(ENGINE) as session:
285
286
  query=session.query(HealthLog)
286
287
  query=orderQuery(query,HealthLog.DTOE)
@@ -305,14 +306,30 @@ class HealthLogUi:
305
306
 
306
307
  #str.replace(lambda x:x,lambda x:strip_colors(x))
307
308
  #df=df.apply(remove_illegals)
309
+ def remove_illegals(x):
310
+ return x
308
311
  for i in df:
309
312
  df[i]=df[i].apply(lambda x:remove_illegals(strip_colors(x)) if isinstance(x,str) else x)
310
313
  #df[i]=df[i].apply(remove_illegals)
311
- df.to_excel(output,index=False)
314
+ sheetName="HealthLog"
315
+ df.to_excel(output,sheet_name=sheetName,index=False)
316
+
317
+ try:
318
+ for column in df:
319
+ column_length = max(df[column].astype(str).map(len).max(), len(column))
320
+ col_idx = df.columns.get_loc(column)
321
+ output.sheets[sheetName].set_column(col_idx, col_idx, column_length)
322
+
323
+
324
+ output.close()
325
+ except Exception as e:
326
+ print(e)
327
+
328
+
312
329
  with zipfile.ZipFile(BooleanAnswers.HealthLogZip,"w") as oz:
313
330
  oz.write(output)
314
331
  oz.write(BooleanAnswers.IllegalCharsManifest)
315
- print(output.absolute())
332
+ print(fil.absolute())
316
333
  print(BooleanAnswers.IllegalCharsManifest.absolute())
317
334
  print(f"{Fore.orange_red_1}The Below file only contains the above files!{Style.reset}")
318
335
  print(BooleanAnswers.HealthLogZip.absolute())
@@ -334,7 +351,8 @@ class HealthLogUi:
334
351
  fields.append('DTOE')
335
352
  if 'Comments' not in fields:
336
353
  fields.append('Comments')
337
- output=Path(f"HealthLog-fields.xlsx")
354
+ fil=Path(f"HealthLog-fields.xlsx")
355
+ output=pd.ExcelWriter(fil)
338
356
  not_none=[i for i in HealthLog.__table__.columns if str(i.name) in not_none]
339
357
  with Session(ENGINE) as session:
340
358
  query=session.query(HealthLog).filter(or_(*[i!=None for i in not_none]))
@@ -359,13 +377,29 @@ class HealthLogUi:
359
377
  df=pd.read_sql(query.statement,session.bind)
360
378
 
361
379
  df=df[fields]
380
+ def remove_illegals(x):
381
+ return x
362
382
  for i in df:
363
383
  df[i]=df[i].apply(lambda x:remove_illegals(strip_colors(x)) if isinstance(x,str) else x)
364
- df.to_excel(output,index=False)
384
+
385
+ sheetName="HealthLog"
386
+ df.to_excel(output,sheet_name=sheetName,index=False)
387
+
388
+ try:
389
+ for column in df:
390
+ column_length = max(df[column].astype(str).map(len).max(), len(column))
391
+ col_idx = df.columns.get_loc(column)
392
+ output.sheets[sheetName].set_column(col_idx, col_idx, column_length)
393
+
394
+
395
+ output.close()
396
+
397
+ except Exception as e:
398
+ print(e)
365
399
  with zipfile.ZipFile(BooleanAnswers.HealthLogZip,"w") as oz:
366
400
  oz.write(output)
367
401
  oz.write(BooleanAnswers.IllegalCharsManifest)
368
- print(output.absolute())
402
+ print(fil.absolute())
369
403
  print(BooleanAnswers.IllegalCharsManifest.absolute())
370
404
  print(f"{Fore.orange_red_1}The Below file only contains the above files!{Style.reset}")
371
405
  print(BooleanAnswers.HealthLogZip.absolute())
radboy/__init__.py CHANGED
@@ -1 +1 @@
1
- VERSION='0.0.573'
1
+ VERSION='0.0.574'
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: radboy
3
- Version: 0.0.573
3
+ Version: 0.0.574
4
4
  Summary: A Retail Calculator for Android/Linux
5
5
  Author: Carl Joseph Hirner III
6
6
  Author-email: Carl Hirner III <k.j.hirner.wisdom@gmail.com>
@@ -45,6 +45,7 @@ Requires-Dist: pycryptodome
45
45
  Requires-Dist: forecast_weather
46
46
  Requires-Dist: boozelib
47
47
  Requires-Dist: pint_pandas
48
+ Requires-Dist: xlsxwriter
48
49
  Dynamic: author
49
50
  Dynamic: requires-python
50
51
 
@@ -5,7 +5,7 @@ radboy/Holidays.txt,sha256=y-JZPihh5iaWKxMIHNXD39yVuVmf1vMs4FdNDcg0f1Y,3114
5
5
  radboy/InventoryGlossary.txt,sha256=018-Yqca6DFb10jPdkUY-5qhkRlQN1k3rxoTaERQ-LA,91008
6
6
  radboy/RecordMyCodes.py,sha256=Lt2reA6xchq3U7Y08DvkrHboZ25i1ts7X2E9gSIwcVg,41101
7
7
  radboy/Run.py,sha256=JUoCTHnzQBv7n8PB2_i93ANdAC_iW__RkAge8esCnk4,76
8
- radboy/__init__.py,sha256=dC1Jh63ufXJyIrO63fG5tZoIKheWkv6BWtxnwYXTGo8,17
8
+ radboy/__init__.py,sha256=Sk4GDtczBQpX0Nn6TxpqkYs89wY7GAZKWPdBFtcJleE,17
9
9
  radboy/api_key,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  radboy/case-export-2024-05-14-13-10-00.672971.xlsx,sha256=Wd592d_VLFmfUI9KKKSVjNwjV91euc1T7ATyvwvUhlg,5431
11
11
  radboy/case-export-2024-05-14-13-13-22.540614.xlsx,sha256=OnGrhmScHfGp_mVaWW-LNMsqrQgyZDpiU3wV-2s3U5Q,5556
@@ -211,10 +211,10 @@ radboy/GeoTools/__pycache__/GeoClass.cpython-313.pyc,sha256=eZ6hpLKoic1XCb7BKKg-
211
211
  radboy/GeoTools/__pycache__/OSMClass.cpython-312.pyc,sha256=5RoT8_wiI8R7yb_B9FWIC7mALdGNoqyWtkzsjM2pbh0,40387
212
212
  radboy/GeoTools/__pycache__/__init__.cpython-312.pyc,sha256=Y7Xtrzwm44-xuY_4NK8aDjYfVmXIzUFWOyexJu9le8A,1238
213
213
  radboy/GeoTools/__pycache__/__init__.cpython-313.pyc,sha256=-bk9eEIxWZgHYZHtNJbrpubDRWkbdYNkGr5J7sVhyIE,1238
214
- radboy/HealthLog/HealthLog.py,sha256=FxkqCzJUzlFHr6eFnHrJf3Ss6vju5qpa9pGDehwxfJE,36720
214
+ radboy/HealthLog/HealthLog.py,sha256=apAG2MBmrKsDBqrySGTrdtT7KQmTGigrnFz710pGQ7k,37539
215
215
  radboy/HealthLog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
216
216
  radboy/HealthLog/__pycache__/HealthLog.cpython-312.pyc,sha256=hTo4o7jo9L2yqPZgzuKUw_kon_PVcCuTRguELTuLrIo,27946
217
- radboy/HealthLog/__pycache__/HealthLog.cpython-313.pyc,sha256=huxQNOm0b957SYiNk5ekIXa-rw2GDYnR3PDNucukQTY,57025
217
+ radboy/HealthLog/__pycache__/HealthLog.cpython-313.pyc,sha256=zx8G-s0Jyy5Y2uQWy-f_6rkMbcl_WOQPPq5QaIM9uac,58881
218
218
  radboy/HealthLog/__pycache__/__init__.cpython-312.pyc,sha256=yZrYKBk31pGSjCRqmqzpX409iw-muC1zsNO2ObqkGlY,272
219
219
  radboy/HealthLog/__pycache__/__init__.cpython-313.pyc,sha256=cqdZbEJKq9XVoVqDAwsW0pwwBBGSerJNWGlST3YVR3g,151
220
220
  radboy/InListRestore/ILR.py,sha256=s8fbbHLKQSVJX1VaeyGE-vdIUGBEbOPX29kRIG2j2WY,16847
@@ -399,7 +399,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
399
399
  radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
400
400
  radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
401
401
  radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
402
- radboy/__pycache__/__init__.cpython-313.pyc,sha256=FZxIJkrzsrqj1r_b41gKp2X7uOgImuzj5UXFJLi3C44,165
402
+ radboy/__pycache__/__init__.cpython-313.pyc,sha256=KVPDG6b63efWVCXilOoAVLzCPDfyHbv35TZHCMLUjKg,165
403
403
  radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
404
404
  radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
405
405
  radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
@@ -427,7 +427,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
427
427
  radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
428
428
  radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
429
429
  radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
430
- radboy-0.0.573.dist-info/METADATA,sha256=67vVViZeodiQi3Bs0eLOa8ddFx3Thugc5WInB3EJJV4,1636
431
- radboy-0.0.573.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
432
- radboy-0.0.573.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
433
- radboy-0.0.573.dist-info/RECORD,,
430
+ radboy-0.0.574.dist-info/METADATA,sha256=WR-65r-oEJQyjGeXPGJhDbgwQxNH8E5qbjJplQQ-Gqw,1662
431
+ radboy-0.0.574.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
432
+ radboy-0.0.574.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
433
+ radboy-0.0.574.dist-info/RECORD,,