def fix_version_all_case(ls_of_tuples, library): rocm_versions = get_rocm_versions(ls_of_tuples) if 'All' in rocm_versions: for i, data in enumerate(ls_of_tuples): if data[0] == "Version(s)" and 'All' in data[1]: rocm_versions = model.get_field_values(library, 'Version(s)') rocm_versions = rocm_versions[:-1] tupl_to_ls = list(data) tupl_to_ls[1] = rocm_versions ls_of_tuples[i] = tuple(tupl_to_ls) return ls_of_tuples
def update_library_field_value(field_type, jsonified_selected_lib, _, field_value_options, is_multi_selection): if field_type is None: field_value_options = [{'label':'Select Type', 'value':'Select Type', 'disabled':True, 'title': 'Select field type first'}] return [field_value_options, is_multi_selection] library = json.loads(jsonified_selected_lib) options = model.get_field_values(library, field_type) options = [{'label': item, 'value': item} for item in options] is_multi= model.is_multi_selection(library, field_type) if is_multi: is_multi_selection = True return [options, is_multi_selection]
def make_possible_collection_permutations(ls_of_tuples, library): gpu_servers = get_gpu_servers(ls_of_tuples) test_suites = get_test_suites(ls_of_tuples) rocm_versions = get_rocm_versions(ls_of_tuples) if 'All' in rocm_versions: rocm_versions = model.get_field_values(library, 'Version(s)') library = library.lower() gpu_servers, test_suites = check_for_possible_gpu_test_suite_conflict( gpu_servers, test_suites) if not isinstance(gpu_servers, list): failed = gpu_servers return failed collections = [] for server in gpu_servers: for rocm_version in rocm_versions: for suite in test_suites: collection = server.lower( ) + '/' + library + '/' + rocm_version + '/' + suite collections.append(collection) return collections