restore old code structure so we can test subsets again

This commit is contained in:
Axel Kohlmeyer
2024-09-01 00:17:25 -04:00
parent 0f1b7b5bd6
commit af747ac6c0

View File

@ -899,8 +899,7 @@ if __name__ == "__main__":
parser = ArgumentParser() parser = ArgumentParser()
parser.add_argument("--lmp-bin", dest="lmp_binary", default="", help="LAMMPS binary") parser.add_argument("--lmp-bin", dest="lmp_binary", default="", help="LAMMPS binary")
parser.add_argument("--config-file", dest="config_file", default=configFileName, help="Configuration YAML file") parser.add_argument("--config-file", dest="config_file", default=configFileName, help="Configuration YAML file")
parser.add_argument("--examples-top-level", dest="example_toplevel", default=os.path.join(LAMMPS_DIR, 'examples'), parser.add_argument("--examples-top-level", dest="example_toplevel", default="", help="Examples top-level")
help="Examples top-level")
parser.add_argument("--example-folders", dest="example_folders", default="", help="Example subfolders") parser.add_argument("--example-folders", dest="example_folders", default="", help="Example subfolders")
parser.add_argument("--list-input", dest="list_input", default="", help="File that lists the input scripts") parser.add_argument("--list-input", dest="list_input", default="", help="File that lists the input scripts")
parser.add_argument("--list-subfolders", dest="list_subfolders", default="", help="File that lists the subfolders") parser.add_argument("--list-subfolders", dest="list_subfolders", default="", help="File that lists the subfolders")
@ -974,6 +973,7 @@ if __name__ == "__main__":
regex = get_quick_list.make_regex(styles) regex = get_quick_list.make_regex(styles)
print("regex ", regex) print("regex ", regex)
if regex: if regex:
if not example_toplevel: example_toplevel = os.path.join(LAMMPS_DIR, 'examples')
input_list = get_quick_list.get_examples_using_styles(regex, example_toplevel) input_list = get_quick_list.get_examples_using_styles(regex, example_toplevel)
msg = f"\nThere are {len(input_list)} input scripts with changed styles relative to branch {quick_branch}." msg = f"\nThere are {len(input_list)} input scripts with changed styles relative to branch {quick_branch}."
print(msg) print(msg)
@ -1005,10 +1005,10 @@ if __name__ == "__main__":
except: except:
pass pass
quit() quit()
else:
# if the example folders are not specified from the command-line argument --example-folders # if the example folders are not specified from the command-line argument --example-folders
# then use the path from --example-top-folder, or from the input-list read from a text file # then use the path from --example-top-folder, or from the input-list read from a text file
if len(example_subfolders) == 0: elif len(example_subfolders) == 0:
# if the top level is specified # if the top level is specified
if len(example_toplevel) != 0: if len(example_toplevel) != 0: