Skip to content

Commit 9be4e27

Browse files
committed
Updated Syntax and Values
Changed the way phi theta kappa question was formed. Updated syntax for vet status for a cleaner output.
1 parent 25a81ed commit 9be4e27

File tree

4 files changed

+34
-33
lines changed

4 files changed

+34
-33
lines changed

core/reportgen.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,8 @@ def handle_third_page(self, canvas: object, select_app: int, last_idx: int) -> N
412412
'RES: RESIDENCY CLAIM': s.residency_claim_syntax(target),
413413
'RES: DETERM': s.residency_determ_syntax(target),
414414
'FAMILY OBLIGATIONS': s.family_obj_syntax(target),
415-
'APPLICATION SHARING': s.app_share_syntax(target)
415+
'APPLICATION SHARING': s.app_share_syntax(target),
416+
'PHI THETA KAPPA': s.phi_theta_kappa_syntax(target)
416417
}
417418

418419
for key, value in req_syntax.items():
@@ -430,12 +431,6 @@ def handle_third_page(self, canvas: object, select_app: int, last_idx: int) -> N
430431
conv = struct.transform_page(val)
431432

432433
if conv != "None":
433-
print(type(conv))
434-
if type(conv) == list:
435-
for x in range(len(conv)):
436-
canvas.drawString(xstart, ystart+yadd, str(conv[x]))
437-
yadd -= 10
438-
else:
439-
canvas.drawString(xstart, ystart+yadd, str(conv)) # prints syntax values
440-
# canvas.drawString(xstart, ystart+yadd, val + _str)
441-
yadd -= 10
434+
canvas.drawString(xstart, ystart+yadd, str(conv)) # prints syntax values
435+
# canvas.drawString(xstart, ystart+yadd, val + _str)
436+
yadd -= 10

core/syntax.py

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -380,37 +380,28 @@ def vet_syntax(self, _list: list) -> list:
380380
return
381381

382382
syntax = {
383-
'1': '\nVeteran',
384-
'2': '\nCurrent US Miliary Service Member',
385-
'3': '\nSpouse or Dependen of Veteran or Current Service Member',
386-
'4': '\nSpouce or dependent of, or a veteran or current U.S. military servicemember with injury or illness',
383+
'1': 'Veteran',
384+
'2': 'Current US Miliary Service Member',
385+
'3': 'Spouse or Dependen of Veteran or Current Service Member',
386+
'4': 'Spouce or dependent of, or a veteran or current U.S. military servicemember with injury or illness',
387387
'4+': 'resulting from military service (service-connected injury/illness)',
388-
'5': '\nSpouse or dependent of deceased US servicemember'
388+
'5': 'Spouse or dependent of deceased US servicemember'
389389
}
390390

391-
target = str(_list[-1]).replace("\\", "")
392-
393-
output = [str(val) for val in target]
391+
output = [str(val) for val in str(_list[-1]).replace("\\", "")]
392+
output.insert(0, 'U.S. Military-Veteran Status?')
393+
output.append(" ")
394394

395395
for idx in range(len(output)):
396396
if output[idx] == '4':
397397
output.insert(idx+1, '4+')
398398

399-
400399
for idx in range(len(output)):
401400
for key, value in syntax.items():
402401
if key == output[idx]:
403402
output[idx] = value
404403

405-
if len(output) == 1:
406-
return ['U.S. Military-Veteran Status?',
407-
f'{output}']
408-
elif len(output) == 2:
409-
return ['U.S. Military-Veteran Status?',
410-
f'{output[0]}', f'{output[1]}']
411-
elif len(output) == 3:
412-
return ['U.S. Military-Veteran Status?',
413-
f'{output[0]}', f'{output[1]}', f'{output[2]}']
404+
return output
414405

415406
def home_syntax(self, _list: list) -> list:
416407

@@ -505,7 +496,22 @@ def app_share_syntax(self, _list: list) -> list:
505496
target = value
506497

507498
return ['Application sharing on denied admission?',
508-
f'{target}']
499+
f'{target}', '']
500+
501+
def phi_theta_kappa_syntax(self, _list: list) -> list:
502+
503+
if _list[3] != 'PHI THETA KAPPA':
504+
return
505+
506+
syntax = {
507+
'N\\': 'No',
508+
'Y\\': 'Yes'
509+
}
510+
511+
output = syntax.get(_list[-1], _list[-1])
512+
513+
return ['Are you a Phi Theta Kappa?',
514+
f'{output}', '']
509515

510516
def residency_determ_syntax(self, _list: list) -> list:
511517

core/values.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def long_med_req_value(self, _str: str) -> str:
3939
'REVERSE TRANSFER': None,
4040
'APPLICATION SHARING': None,
4141
'FORMER STUDENT': None,
42-
'PHI THETA KAPPA': f'Are you a Phi Theta Kappa? {output}',
42+
'PHI THETA KAPPA': None, # f'Are you a Phi Theta Kappa? {output}',
4343
'INT CURR RESIDE IN US': f'Are you currently residing in the U.S.? {output}',
4444
'ULTIMATE DEGREE SOUGHT': f'Ultimate degree you wish to seek in this major from this institution? ',
4545
'PAYMENT RECONCILIATION': "Billing Information:",
@@ -105,9 +105,9 @@ def long_med_req_value(self, _str: str) -> str:
105105
if key == target:
106106
if target == 'ULTIMATE DEGREE SOUGHT':
107107
return value + self.additional_value(_str)
108-
108+
109109
return value
110-
110+
111111
return _str
112112

113113
def req_and_or_answer_value(self, _str: str) -> str:

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def run(file: str, fileName: str) -> None:
160160
# run(file, fileName)
161161

162162
file, fileName = find_spe_file()
163-
run_target(file, fileName, 'domestic', 4)
163+
run_target(file, fileName, 'domestic', 3)
164164

165165
# filePath_list, fileName_list = find_spe_folder_files()
166166
# for idx in range(len(filePath_list)):

0 commit comments

Comments
 (0)