Пример #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')
Пример #2
0
def main():
    master_path = configuration_validation_tool.find_one_master()  # Asks for the location of the 'master.pmc'.
    st_path = configuration_validation_tool.st_file()  # Asks for the location of the 'st.cmd'.
    raw_mcs_data = mcs_data_grab(master_path)
    st_data = motor_record_st_grab.st_match(st_path, master_path)
    mcs_data = epics_dict(raw_mcs_data)
    data = format_data(mcs_data, st_data)
    beamline = mcs_data[0]['BEAMLINE']['value']
    mcs = mcs_data[0]['CONTROLLER']['value']
    export_motor_record(data, mcs,
                        beamline)  # Exports the Motor Record to a file in the directory that the program is running.
    answer = input('Would you like to make another motor record? [Y/N]\n or type "Other" to select a different tool.\n')
    configuration_validation_tool.retry(answer, '2')
Пример #3
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()
Пример #5
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')