def run():
    """Main function to execute the script logic."""
    current_directory = os.path.dirname(os.path.abspath(__file__))
    modified_files = get_modified_files(current_directory)
    commit_number = get_current_commit_number()
    sample_data_url = f'{SENTINEL_REPO_RAW_URL}/{commit_number}/{SAMPLE_DATA_PATH}'
    parser_yaml_files = filter_yaml_files(modified_files)
    print(f"{GREEN}Following files were found to be modified:{RESET}")
    for file in parser_yaml_files:
        print(f"{YELLOW}{file}{RESET}")
    
    for parser in parser_yaml_files:
        
        schema_name = extract_schema_name(parser)
        if parser.endswith((f'ASim{schema_name}.yaml', f'im{schema_name}.yaml', f'vim{schema_name}Empty.yaml')):
            print(f"{YELLOW}Skipping '{parser}' as this is a union or empty parser file. This file won't be tested.{RESET}")
            continue
        # Skip vim parser file if the corresponding ASim parser file is not present
        elif parser.split('/')[-1].startswith('vim'):
             # Check if ASim parser file is present in the changed files list. If not present, replace vim with ASim.
             # This could the case where only vim parser file is being updated and ASim parser file is not updated.
             # But we should be testing both ASim and vim parser files.
             if parser.replace('vim', 'ASim') not in parser_yaml_files:
                 parser = parser.replace('vim', 'ASim')
             else :
                 # Skip the vim parser file as the corresponding ASim parser file is present and vim files will be tested with ASim files in upcoming steps.
                 continue 
        asim_parser_url = f'{SENTINEL_REPO_RAW_URL}/{commit_number}/{parser}'
        print(f'{YELLOW}Constructed parser raw url:  {asim_parser_url}{RESET}') # uncomment for debugging
        asim_union_parser_url = f'{SENTINEL_REPO_RAW_URL}/{commit_number}/Parsers/ASim{schema_name}/Parsers/ASim{schema_name}.yaml'
        print(f'{YELLOW}Constructed union parser raw url:  {asim_union_parser_url}{RESET}') # uncomment for debugging
        asim_parser = read_github_yaml(asim_parser_url)
        asim_union_parser = read_github_yaml(asim_union_parser_url)
        # Both ASim and union parser files should be present to proceed with the tests
        if not (check_parser_found(asim_parser, asim_parser_url) and check_parser_found(asim_union_parser, asim_union_parser_url)):
            continue
        print_test_header(asim_parser.get('EquivalentBuiltInParser'))
        results = extract_and_check_properties(asim_parser, asim_union_parser, "ASim", asim_parser_url, sample_data_url)
        print_results_table(results)

        check_test_failures(results, asim_parser)

        vim_parser, vim_union_parser = get_vim_parsers(asim_parser_url, asim_union_parser_url, asim_parser)
        # Both vim and union parser files should be present to proceed with the tests
        if not (check_parser_found(vim_parser, asim_parser_url) and check_parser_found(vim_union_parser, asim_union_parser_url)):
            continue
        print_test_header(vim_parser.get('EquivalentBuiltInParser'))
        results = extract_and_check_properties(vim_parser, vim_union_parser, "vim", asim_parser_url, sample_data_url)
        print_results_table(results)

        check_test_failures(results, vim_parser)
Main function to execute the script logic.
.script/tests/asimParsersTest/VerifyASimParserTemplate.py