radboy 0.0.572__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.572'
1
+ VERSION='0.0.574'
Binary file
@@ -436,4 +436,14 @@ Here:
436
436
  'desc':f'A=BH/2',
437
437
  'exec':area_triangle,
438
438
  },
439
+ f'{uuid1()}':{
440
+ 'cmds':['taxable kombucha',],
441
+ 'desc':f'is kombucha taxable?[taxable=True,non-taxable=False]',
442
+ 'exec':lambda: Taxable.kombucha(None),
443
+ },
444
+ f'{uuid1()}':{
445
+ 'cmds':['taxable item',],
446
+ 'desc':f'is item taxable?[taxable=True,non-taxable=False]',
447
+ 'exec':lambda: Taxable.general_taxable(None),
448
+ },
439
449
  }
@@ -83,4 +83,114 @@ def area_triangle():
83
83
  elif isinstance(height,pint.Quantity) and isinstance(base,decimal.Decimal):
84
84
  return ((height*unit_registry.Quantity(base,height.units))/2)
85
85
  elif isinstance(height,decimal.Decimal) and isinstance(base,pint.Quantity):
86
- return ((unit_registry.Quantity(height,base.units)*base)/2)
86
+ return ((unit_registry.Quantity(height,base.units)*base)/2)
87
+
88
+ class Taxable:
89
+ def general_taxable(self):
90
+ taxables=[
91
+ "Alcoholic beverages",
92
+ "Books and publications",
93
+ "Cameras and film",
94
+ "Carbonated and effervescent water",
95
+ "Carbonated soft drinks and mixes",
96
+ "Clothing",
97
+ "Cosmetics",
98
+ "Dietary supplements",
99
+ "Drug sundries, toys, hardware, and household goods",
100
+ "Fixtures and equipment used in an activity requiring the holding of a seller’s permit, if sold at retail",
101
+ "Food sold for consumption on your premises (see Food service operations)",
102
+ "Hot prepared food products (see Hot prepared food products)",
103
+ "Ice",
104
+ "Kombucha tea (if alcohol content is 0.5 percent or greater by volume)",
105
+ "Medicated gum (for example, Nicorette and Aspergum)",
106
+ "Newspapers and periodicals",
107
+ "Nursery stock",
108
+ "Over-the-counter medicines (such as aspirin, cough syrup, cough drops, and throat lozenges)",
109
+ "Pet food and supplies",
110
+ "Soaps or detergents",
111
+ "Sporting goods",
112
+ "Tobacco products",
113
+ ]
114
+ nontaxables=[
115
+ "Baby formulas (such as Isomil)",
116
+ "Cooking wine",
117
+ "Energy bars (such as PowerBars)",
118
+ """Food products—This includes baby food, artificial sweeteners, candy, gum, ice cream, ice cream novelties,
119
+ popsicles, fruit and vegetable juices, olives, onions, and maraschino cherries. Food products also include
120
+ beverages and cocktail mixes that are neither alcoholic nor carbonated. The exemption applies whether sold in
121
+ liquid or frozen form.""",
122
+ "Granola bars",
123
+ "Kombucha tea (if less than 0.5 percent alcohol by volume and naturally effervescent)",
124
+ "Sparkling cider",
125
+ "Noncarbonated sports drinks (including Gatorade, Powerade, and All Sport)",
126
+ "Pedialyte",
127
+ "Telephone cards (see Prepaid telephone debit cards and prepaid wireless cards)",
128
+ "Water—Bottled noncarbonated, non-effervescent drinking water",
129
+ ]
130
+
131
+ taxables_2=[
132
+ "Alcoholic beverages",
133
+ '''Carbonated beverages, including semi-frozen beverages
134
+ containing carbonation, such as slushies (see Carbonated fruit
135
+ juices)''',
136
+ "Coloring extracts",
137
+ "Dietary supplements",
138
+ "Ice",
139
+ "Over-the-counter medicines",
140
+ "Tobacco products",
141
+ "non-human food",
142
+ "Kombucha tea (if >= 0.5% alcohol by volume and/or is not naturally effervescent)",
143
+ ]
144
+ for i in taxables_2:
145
+ if i not in taxables:
146
+ taxables.append(i)
147
+
148
+ ttl=[]
149
+ for i in taxables:
150
+ ttl.append(i)
151
+ for i in nontaxables:
152
+ ttl.append(i)
153
+ htext=[]
154
+ cta=len(ttl)
155
+ ttl=sorted(ttl,key=str)
156
+ for num,i in enumerate(ttl):
157
+ htext.append(std_colorize(i,num,cta))
158
+ htext='\n'.join(htext)
159
+ while True:
160
+ print(htext)
161
+ select=Control(func=FormBuilderMkText,ptext="Please select all indexes that apply to item?",helpText=htext,data="list")
162
+ if select is None:
163
+ return
164
+ for i in select:
165
+ try:
166
+ index=int(i)
167
+ if ttl[index] in taxables:
168
+ return True
169
+ except Exception as e:
170
+ print(e)
171
+ return False
172
+ def kombucha(self):
173
+ '''determine if kombucha is taxable'''
174
+ fd={
175
+ 'Exceeds 0.5% ABV':{
176
+ 'default':False,
177
+ 'type':'boolean',
178
+ },
179
+ 'Is it Naturally Effervescent?':{
180
+ 'default':False,
181
+ 'type':'boolean',
182
+ },
183
+
184
+ }
185
+ data=FormBuilder(data=fd)
186
+ if data is None:
187
+ return
188
+ else:
189
+ if data['Exceeds 0.5% ABV']:
190
+ return True
191
+
192
+ if not data['Is it Naturally Effervescent?']:
193
+ return True
194
+
195
+ return False
196
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: radboy
3
- Version: 0.0.572
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=MH6iD2wtoQTOXzY_ak8S7bD1m9n8NjcuC1KYAw2tIv8,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=nuhAHimY98E44HqF6khcUEn9oKijOxPseNA7OEc49t8,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
@@ -409,8 +409,8 @@ radboy/__pycache__/t.cpython-311.pyc,sha256=bVszNkmfiyoNLd0WUc8aBJc2geGseW4O28cq
409
409
  radboy/__pycache__/te.cpython-311.pyc,sha256=vI8eNUE5VVrfCQvnrJ7WuWpoKcLz-vVK3ifdUZ4UNhk,592
410
410
  radboy/__pycache__/x.cpython-311.pyc,sha256=3jIvWoO5y5WqrL_hRmXNK8O0vO7DwJ4gufjm2b0V7VI,1963
411
411
  radboy/preloader/__init__.py,sha256=lrGR0JF0dkDM8N9ORGUKH_MucUFx1-PI38YsvqS-wgA,926
412
- radboy/preloader/preloader.py,sha256=VXzIfFOxuYmp1pEGOCnlte15QJnwggRySz3IdxHSPb8,12421
413
- radboy/preloader/preloader_func.py,sha256=PsfNUi0VMBUjweCygfei6gVuYzpUcBsTjuxPIkwYXvk,2652
412
+ radboy/preloader/preloader.py,sha256=SX7wmdp3-H5FT7TAcqcImT8XSPcvG25sfIKGfVBqTDo,12778
413
+ radboy/preloader/preloader_func.py,sha256=Y0_6_gdvV0AAmTptxzcnuej9RS2nD9A2ii-PpflB0J8,5845
414
414
  radboy/setCode/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
415
415
  radboy/setCode/setCode.py,sha256=8UOf4okbx-Zane99odeoLAS_lfIt8pIaFomN7EtnnVA,5202
416
416
  radboy/setCode/__pycache__/__init__.cpython-311.pyc,sha256=cJuP5rve6Wn7ZO789tixyOlyrHZQWsBxDn9oZGoG5WE,232
@@ -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.572.dist-info/METADATA,sha256=juJ0k5Y8PCfXWLLdkLN9VX3r7ONi_xU0kD6J7yPdTUw,1636
431
- radboy-0.0.572.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
432
- radboy-0.0.572.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
433
- radboy-0.0.572.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,,