radboy 0.0.451__py3-none-any.whl → 0.0.453__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.

@@ -22,6 +22,7 @@ import numpy as np
22
22
  from datetime import *
23
23
  from colored import Style,Fore
24
24
  import json,sys,math,re,calendar
25
+ import plotext as plt
25
26
 
26
27
  class HealthLogUi:
27
28
  def new_health_log(self):
@@ -255,6 +256,32 @@ class HealthLogUi:
255
256
  HealthLog.__table__.drop(ENGINE)
256
257
  HealthLog.metadata.create_all(ENGINE)
257
258
 
259
+
260
+ def GraphIt(self,query,session,fields=['BloodSugar','HeartRate'],errors=False):
261
+ while True:
262
+ print(f"{Fore.light_magenta}Dates on the Graph(s) are in the format of {Fore.orange_red_1}Day/Month/Year{Fore.light_magenta}, whereas Date Input will remain {Fore.light_steel_blue}Month/Day/Year{Style.reset}")
263
+ df_from_records = pd.read_sql_query(query.statement,session.bind)
264
+
265
+ for num,field in enumerate(fields):
266
+ try:
267
+
268
+ df_from_records['DTOES']=df_from_records['DTOE'].dt.strftime("%d/%m/%Y")
269
+ plt.bar(df_from_records['DTOES'],df_from_records[field],label=f'Original Data From {field}')
270
+ plt.show()
271
+ plt.clf()
272
+ except Exception as ee:
273
+ if errors:
274
+ print(ee,repr(ee))
275
+ else:
276
+ pass
277
+ print(f"{Fore.light_magenta}Dates on the Graph(s) are in the format of {Fore.orange_red_1}Day/Month/Year{Fore.light_magenta}, whereas Date Input will remain {Fore.light_steel_blue}Month/Day/Year{Style.reset}")
278
+ n=Prompt.__init2__(None,func=FormBuilderMkText,ptext="Next?",helpText="next y/n",data="boolean")
279
+ if n in ['None',]:
280
+ return None
281
+ elif n in [True,]:
282
+ return True
283
+
284
+
258
285
  def showAllField(self,fields=[],not_none=[]):
259
286
  try:
260
287
  fields.extend(["DTOE","HLID","Comments"])
@@ -263,6 +290,23 @@ class HealthLogUi:
263
290
  with Session(ENGINE) as session:
264
291
  results=session.query(HealthLog).filter(or_(*[i!=None for i in not_none]))
265
292
  results=orderQuery(results,HealthLog.DTOE)
293
+
294
+ graph_it=Prompt.__init2__(None,func=FormBuilderMkText,ptext="Graph Results (if possible)[y/N]:",helpText="yes or no; default is No.",data="boolean")
295
+
296
+ if graph_it in [None,]:
297
+ return
298
+ elif graph_it in ['d',]:
299
+ graph_it=False
300
+
301
+ if graph_it:
302
+ includes=["int","integer","float","decimal"]
303
+ excludes=["HLID"]
304
+ fields_for_total=[str(i.name) for i in HealthLog.__table__.columns if str(i.type).lower() in includes and str(i.name) not in excludes]
305
+ print(fields_for_total)
306
+ x=self.GraphIt(results,session,fields_for_total)
307
+ if x is None:
308
+ return
309
+
266
310
  results=results.all()
267
311
  ct=len(results)
268
312
  for num,i in enumerate(results):
@@ -365,12 +409,12 @@ class HealthLogUi:
365
409
  'lsdrug':{
366
410
  'cmds':['ls drug','ls dg','list drug','lsdrug','lsdrg'],
367
411
  'desc':'list drug data',
368
- 'exec':lambda self=self:self.showAllField(fields=['DrugConsumed','DrugQtyConsumed','DrugQtyConsumedUnitName'],not_none=['DrugQtyConsumed',])
412
+ 'exec':lambda self=self:self.showAllField(fields=['EntryBarcode','EntryName','DrugConsumed','DrugQtyConsumed','DrugQtyConsumedUnitName'],not_none=['DrugQtyConsumed',])
369
413
  },
370
414
  'xpt drug':{
371
415
  'cmds':['xpt drug','xpt dg','export drug','xptdrug','xptdrg'],
372
416
  'desc':'export drug data to excel',
373
- 'exec':lambda self=self:self.export_log_field(fields=['DrugConsumed','DrugQtyConsumed','DrugQtyConsumedUnitName'],not_none=['DrugQtyConsumed',])
417
+ 'exec':lambda self=self:self.export_log_field(fields=['EntryBarcode','EntryName','DrugConsumed','DrugQtyConsumed','DrugQtyConsumedUnitName'],not_none=['DrugQtyConsumed',])
374
418
  },
375
419
  'add drug':{
376
420
  'cmds':['adrg','add drug','add drg','adddrug','adrug'],
radboy/__init__.py CHANGED
@@ -1 +1 @@
1
- VERSION='0.0.451'
1
+ VERSION='0.0.453'
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: radboy
3
- Version: 0.0.451
3
+ Version: 0.0.453
4
4
  Summary: A small example package
5
5
  Author: Carl Joseph Hirner III
6
6
  Author-email: Carl Hirner III <k.j.hirner.wisdom@gmail.com>
@@ -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=dOm24buf-rWC4FGLQLDjL5obdxOKF3D01t6Qkkit-R0,41421
7
7
  radboy/Run.py,sha256=JUoCTHnzQBv7n8PB2_i93ANdAC_iW__RkAge8esCnk4,76
8
- radboy/__init__.py,sha256=IXU8WAKTuhyIlMn1Ek-aCTlUVW2cCiSgh9Atyckx6yM,17
8
+ radboy/__init__.py,sha256=YIIE0dx91_OPurQKy1Q-WxOwYPDTia3yRy0tAE-yx8E,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
@@ -210,10 +210,10 @@ radboy/GeoTools/__pycache__/GeoClass.cpython-313.pyc,sha256=eZ6hpLKoic1XCb7BKKg-
210
210
  radboy/GeoTools/__pycache__/OSMClass.cpython-312.pyc,sha256=5RoT8_wiI8R7yb_B9FWIC7mALdGNoqyWtkzsjM2pbh0,40387
211
211
  radboy/GeoTools/__pycache__/__init__.cpython-312.pyc,sha256=Y7Xtrzwm44-xuY_4NK8aDjYfVmXIzUFWOyexJu9le8A,1238
212
212
  radboy/GeoTools/__pycache__/__init__.cpython-313.pyc,sha256=-bk9eEIxWZgHYZHtNJbrpubDRWkbdYNkGr5J7sVhyIE,1238
213
- radboy/HealthLog/HealthLog.py,sha256=R-fUJB6DuWpmCTsX9WSl4N1VBJ7ZtLkbvbwFeR5RkrI,19902
213
+ radboy/HealthLog/HealthLog.py,sha256=KnSICUMVXSCiCjm_6CbLRuMbq1s9jgdRuz8TRz6P3u8,21699
214
214
  radboy/HealthLog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
215
215
  radboy/HealthLog/__pycache__/HealthLog.cpython-312.pyc,sha256=hTo4o7jo9L2yqPZgzuKUw_kon_PVcCuTRguELTuLrIo,27946
216
- radboy/HealthLog/__pycache__/HealthLog.cpython-313.pyc,sha256=rx_4FnqHA-SYRDutV5Jg6tLNs0gBYhc3wnn-CBfZG6U,32373
216
+ radboy/HealthLog/__pycache__/HealthLog.cpython-313.pyc,sha256=dczFzFfVQ7C3z5R7_Kb1Nl9TV6zECpyzYWQN4vAhQLE,35350
217
217
  radboy/HealthLog/__pycache__/__init__.cpython-312.pyc,sha256=yZrYKBk31pGSjCRqmqzpX409iw-muC1zsNO2ObqkGlY,272
218
218
  radboy/HealthLog/__pycache__/__init__.cpython-313.pyc,sha256=cqdZbEJKq9XVoVqDAwsW0pwwBBGSerJNWGlST3YVR3g,151
219
219
  radboy/InListRestore/ILR.py,sha256=s8fbbHLKQSVJX1VaeyGE-vdIUGBEbOPX29kRIG2j2WY,16847
@@ -394,7 +394,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
394
394
  radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
395
395
  radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
396
396
  radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
397
- radboy/__pycache__/__init__.cpython-313.pyc,sha256=xC8rWgLympNRg7b3rU_VnaCzQFf9tVR1q5wbJWWubz4,165
397
+ radboy/__pycache__/__init__.cpython-313.pyc,sha256=5AaQd_fHz3oVYXyq4XpB4QSlF6WKQYjNBUhy32RBDYw,165
398
398
  radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
399
399
  radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
400
400
  radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
@@ -419,7 +419,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
419
419
  radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
420
420
  radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
421
421
  radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
422
- radboy-0.0.451.dist-info/METADATA,sha256=VTSD1fUWQb-I2_uNjgsTOqBaDOZSAzABTk-95y-aiVY,1574
423
- radboy-0.0.451.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
424
- radboy-0.0.451.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
425
- radboy-0.0.451.dist-info/RECORD,,
422
+ radboy-0.0.453.dist-info/METADATA,sha256=x43yjYeZlZDvFigqWiQLyM8t2N4gOtgrIZNiU8WUT8w,1574
423
+ radboy-0.0.453.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
424
+ radboy-0.0.453.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
425
+ radboy-0.0.453.dist-info/RECORD,,