From 6276e72509b0debbe1d92dc2fb407ea02d0413a3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 8 Aug 2020 23:13:57 -0400 Subject: [PATCH] also check fix styles. properly detect upper case. --- unittest/force-styles/check_tests.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/unittest/force-styles/check_tests.py b/unittest/force-styles/check_tests.py index e145b867d6..a0934eabe8 100755 --- a/unittest/force-styles/check_tests.py +++ b/unittest/force-styles/check_tests.py @@ -55,6 +55,7 @@ kspace = {} pair = {} style_pattern = re.compile("(.+)Style\((.+),(.+)\)") +upper = re.compile("[A-Z]+") gpu = re.compile("(.+)/gpu$") intel = re.compile("(.+)/intel$") kokkos = re.compile("(.+)/kk$") @@ -85,7 +86,7 @@ for header in headers: for m in matches: # skip over internal styles w/o explicit documentation style = m[1] - if style.isupper(): + if upper.match(style): continue # detect, process, and flag suffix styles: @@ -131,6 +132,8 @@ for header in headers: register_style(kspace,style,info) elif m[0] == 'Pair': 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+).*)?') counter += check_tests('kspace',kspace,'kspace-*.yaml', '.*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}")