Skip to content

Commit

Permalink
Fixed regex escapes to quiet unittest warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rfbgo committed Dec 18, 2023
1 parent e370653 commit d62f008
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion var/ramble/repos/builtin/applications/hpcc/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class Hpcc(SpackApplication):
log_str = Expander.expansion_str('out_file')

for metric, unit in summary_metrics:
summary_regex = metric + '=(?P<val>[0-9]+\.[0-9]+)'
summary_regex = metric + r'=(?P<val>[0-9]+\.[0-9]+)'
figure_of_merit(metric,
log_file=log_str,
fom_regex=summary_regex,
Expand Down
4 changes: 2 additions & 2 deletions var/ramble/repos/builtin/applications/lammps/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Lammps(SpackApplication):

executable(
'set-data-path',
template=["sed 's|data\.|" + os.path.join("{lammps-stage}", "bench", "data.") + "|g' -i input.txt"],
template=[r"sed 's|data\.|" + os.path.join("{lammps-stage}", "bench", "data.") + "|g' -i input.txt"],
use_mpi=False
)

Expand Down Expand Up @@ -165,7 +165,7 @@ class Lammps(SpackApplication):
description='Additional execution flags for lammps',
workloads=['hns-reaxff'])

success_criteria('walltime', mode='string', match='\s*Total wall time', file='{log_file}')
success_criteria('walltime', mode='string', match=r'\s*Total wall time', file='{log_file}')

figure_of_merit('Total wall time', fom_regex=r'Total wall time.*\s+(?P<walltime>[0-9:]+)', group_name='walltime', units='')
figure_of_merit('Nanoseconds per day', fom_regex=r'Performance.*\s+(?P<nspd>[0-9\.]+) (ns|tau)/day', group_name='nspd', units='ns/day')
Expand Down

0 comments on commit d62f008

Please sign in to comment.