also check fix styles. properly detect upper case.

This commit is contained in:
Axel Kohlmeyer
2020-08-08 23:13:57 -04:00
parent 511944d9bd
commit 6276e72509

View File

@ -55,6 +55,7 @@ kspace = {}
pair = {} pair = {}
style_pattern = re.compile("(.+)Style\((.+),(.+)\)") style_pattern = re.compile("(.+)Style\((.+),(.+)\)")
upper = re.compile("[A-Z]+")
gpu = re.compile("(.+)/gpu$") gpu = re.compile("(.+)/gpu$")
intel = re.compile("(.+)/intel$") intel = re.compile("(.+)/intel$")
kokkos = re.compile("(.+)/kk$") kokkos = re.compile("(.+)/kk$")
@ -85,7 +86,7 @@ for header in headers:
for m in matches: for m in matches:
# skip over internal styles w/o explicit documentation # skip over internal styles w/o explicit documentation
style = m[1] style = m[1]
if style.isupper(): if upper.match(style):
continue continue
# detect, process, and flag suffix styles: # detect, process, and flag suffix styles:
@ -131,6 +132,8 @@ for header in headers:
register_style(kspace,style,info) register_style(kspace,style,info)
elif m[0] == 'Pair': elif m[0] == 'Pair':
register_style(pair,style,info) register_style(pair,style,info)
elif m[0] == 'Fix':
register_style(fix,style,info)
@ -179,6 +182,8 @@ counter += check_tests('improper',improper,'improper-*.yaml',
'.*improper_style:\s*((\S+).*)?') '.*improper_style:\s*((\S+).*)?')
counter += check_tests('kspace',kspace,'kspace-*.yaml', counter += check_tests('kspace',kspace,'kspace-*.yaml',
'.*kspace_style\s*((\S+).*)?') '.*kspace_style\s*((\S+).*)?')
counter += check_tests('fix',fix,'fix-*.yaml',
' fix\s+((\S+)\s*)?')
total = len(pair)+len(bond)+len(angle)+len(dihedral)+len(improper)+len(kspace) total = len(pair)+len(bond)+len(angle)+len(dihedral)+len(improper)+len(kspace)+len(fix)
print(f"\nTotal tests missing: {counter} of {total}") print(f"\nTotal tests missing: {counter} of {total}")