-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_combined_script.py
More file actions
59 lines (51 loc) · 2.94 KB
/
Copy pathmain_combined_script.py
File metadata and controls
59 lines (51 loc) · 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import os
import program_health_script_v6
import createtraining_summary_overviewcount
import api_report_config
import api_obschecklist_config
import pivotdata_v2_module
import merge_trainingdataog
import mergetrainingdata_module
def get_file_paths(operation):
username = os.getlogin()
python_path = f'/Users/{username}/python'
input_file = input(f'Enter a file name for {operation} (.csv, .xlsx, or .json): ')
file_name_without_extension, file_extension = os.path.splitext(input_file)
input_file_path = os.path.expanduser(f'{python_path}/inputs/{input_file}')
output_dir = os.path.expanduser(f'{python_path}/outputs')
os.makedirs(output_dir, exist_ok=True)
report_output_dir = os.path.expanduser(f'{python_path}/reports')
os.makedirs(report_output_dir, exist_ok=True)
checklist_output_dir = os.path.expanduser(f'{python_path}/checklists')
os.makedirs(checklist_output_dir, exist_ok=True)
return python_path, input_file_path, file_name_without_extension, file_extension, output_dir, report_output_dir, checklist_output_dir
def main():
print("Select the scripts to run (comma-separated numbers for multiple selections):")
print("1. Program Health Script V6")
print("2. Summary Program Overview")
print("3. LMS API Report (.json required)")
print("4. LMS API Observation Checklist (.json required)")
print("5. Product Spec V2")
choices = input("Enter your choices: ").split(',')
# For each choice, get the appropriate file path
for choice in choices:
choice = choice.strip()
if choice == '1':
_, input_file_path, file_name_without_extension, file_extension, output_dir, _, _ = get_file_paths('Program Health Script V6')
program_health_script_v6.process(input_file_path, file_name_without_extension, file_extension, output_dir)
elif choice == '2':
_, input_file_path, file_name_without_extension, file_extension, output_dir, _, _ = get_file_paths('Summary Program Health')
createtraining_summary_overviewcount.process(input_file_path, file_name_without_extension, file_extension, output_dir)
elif choice == '3':
_, input_file_path, _, file_extension, _, report_output_dir, _ = get_file_paths('LMS API Report')
api_report_config.process(input_file_path, file_extension, report_output_dir)
elif choice == '4':
_, input_file_path, _, file_extension, _, _, checklist_output_dir = get_file_paths('LMS API Observation Checklist')
api_obschecklist_config.process(input_file_path, file_extension, checklist_output_dir)
elif choice == '5':
_, input_file_path, file_name_without_extension, file_extension, output_dir, _, _ = get_file_paths('Product Spec V2')
pivotdata_v2_module.process(input_file_path, file_name_without_extension, file_extension, output_dir)
else:
print(f"Invalid choice: {choice}")
if __name__ == "__main__":
main()