Commit efef217a authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Minor fixes to parser matching.

parent 9684d5d7
......@@ -30,7 +30,7 @@ def parse(
else:
parser_name = parser.__class__.__name__
assert parser is not None, 'there is not parser matching %s' % mainfile
assert parser is not None, 'there is no parser matching %s' % mainfile
logger = logger.bind(parser=parser.name) # type: ignore
logger.info('identified parser')
......
......@@ -263,13 +263,12 @@ parsers = [
LegacyParser(
name='parsers/gaussian', code_name='Gaussian',
parser_class_name='gaussianparser.GaussianParser',
# This previous file matching string was too far down the line.
# r'\s*Cite this work as:'
# r'\s*Gaussian [0-9]+, Revision [A-Za-z0-9.]*,'
# r'\s\*\*\*\*\*\*\*\*\*\*\*\**'
# r'\s*Gaussian\s*([0-9]+):\s*([A-Za-z0-9-.]+)\s*([0-9][0-9]?\-[A-Z][a-z][a-z]\-[0-9]+)'
# r'\s*([0-9][0-9]?\-[A-Z][a-z][a-z]\-[0-9]+)')
mainfile_contents_re=r'Gaussian, Inc'),
mainfile_contents_re=(
r'\s*Cite this work as:'
r'\s*Gaussian [0-9]+, Revision [A-Za-z0-9.]*,'
r'\s\*\*\*\*\*\*\*\*\*\*\*\**'
r'\s*Gaussian\s*([0-9]+):\s*([A-Za-z0-9-.]+)\s*([0-9][0-9]?\-[A-Z][a-z][a-z]\-[0-9]+)'
r'\s*([0-9][0-9]?\-[A-Z][a-z][a-z]\-[0-9]+)')),
LegacyParser(
name='parsers/quantumespresso', code_name='Quantum Espresso',
parser_class_name='quantumespressoparser.QuantumEspressoParserPWSCF',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment