Esempio n. 1
0
def main():
    # Runs the asbuilt commands.
    final_data = list()
    beamlines = configuration_validation_tool.find_all_master()
    for beamline in beamlines:
        raw_data = import_data(beamline)
        formatted_data = format_asbuilt(raw_data)
        final_data.append(formatted_data)
    export_asbuilt(final_data)
    answer = input('Would you like to make another asbuilt document? [Y/N]\n or type "Other" to select a different tool'
                   '.\n')
    configuration_validation_tool.retry(answer, '5')
Esempio n. 2
0
def main():
    user_response = input('Do you want to search for all master.pmc files? [Y/N]\n')
    master_file_list = list()
    if user_response.lower() == 'y':
        master_file_list = configuration_validation_tool.find_all_master()
    elif user_response.lower() == 'n':
        master_file_list.append(configuration_validation_tool.find_one_master())
    else:
        print('That is not a valid answer, please try again.')
        main()
    file_data, mcs = build_file(master_file_list)
    export_label_data(mcs, file_data)
    print('Cables labels produced.')
    answer = input('Would you like to produce more cable labels? [Y/N]\n or type "Other" to select a different tool.\n')
    configuration_validation_tool.retry(answer, '3')
def main():
    filter_variables = list()
    values = iter_dict(data_format.levels)
    for value in values:
        filter_variables.append(expand_variables(value))
    master_paths = configuration_validation_tool.find_all_master()
    filename = export_config_validation()
    with open(filename, 'w') as f:
        f.write('\n')
        for gblv_path in master_paths:
            f.write(gblv_path + '\n')
            gblv_data = extract_data.main(gblv_path, filter_variables)
            for check in run_checks(gblv_data):
                for line in check:
                    f.write(line)
            f.write('\n\n')
    print('\nYour file has been created.')
    configuration_validation_tool.retry()
Esempio n. 4
0
def main():
    user_response = input('Do you want to search for all master.pmc files? [Y/N]\n')
    master_file_list = list()
    if user_response.lower() == 'y':
        master_file_list = configuration_validation_tool.find_all_master()
    elif user_response.lower() == 'n':
        master_file_list.append(configuration_validation_tool.find_one_master())
    else:
        print('That is not a valid answer, please try again.')
        main()
    file_data = list()
    for file in master_file_list:
        controller_data = import_label_data(file)
        gblv_label = raw_gblv_label(controller_data)
        file_data.append(gblv_label)
    mcs = extract_data.main(master_file_list[0], 'e_BrickN_P').irow(0)['e_BrickN_P'].strip("'")
    export_gblv_label(file_data, mcs)
    answer = input('Would you like to produce more GBLV labels? [Y/N]\n or type "Other" to select a different tool.\n')
    configuration_validation_tool.retry(answer, '4')