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

Configurable use of "empty" parsers.

parent cc655bd7
......@@ -205,6 +205,7 @@ parser_matching_size = 9128
console_log_level = logging.WARNING
max_upload_size = 32 * (1024 ** 3)
raw_file_strip_cutoff = 1000
use_empty_parsers = False
springer_db_relative_path = 'normalizing/data/SM_all08.db'
......
......@@ -456,28 +456,33 @@ parsers = [
name='parser/onetep', code_name='ONETEP', domain='DFT',
parser_class_name='onetepparser.OnetepParser',
mainfile_contents_re=r'####### # # ####### ####### ####### ######'
),
)
]
if config.use_empty_parsers:
# There are some entries with PIDs that have mainfiles which do not match what
# the actual parsers expect. We use the EmptyParser to produce placeholder entries
# to keep the PIDs. These parsers will not match for new, non migrated data.
EmptyParser(
name='missing/octopus', code_name='Octopus', domain='DFT',
mainfile_name_re=r'(inp)|(.*/inp)'
),
EmptyParser(
name='missing/crystal', code_name='Crystal',
mainfile_name_re=r'.*\.cryst\.out'
),
EmptyParser(
name='missing/wien2k', code_name='WIEN2k',
mainfile_name_re=r'.*\.scf'
),
EmptyParser(
name='missing/fhi-aims', code_name='FHI-aims', domain='DFT',
mainfile_name_re=r'.*\.fhiaims'
),
BrokenParser()
]
parsers.extend([
EmptyParser(
name='missing/octopus', code_name='Octopus', domain='DFT',
mainfile_name_re=r'(inp)|(.*/inp)'
),
EmptyParser(
name='missing/crystal', code_name='Crystal',
mainfile_name_re=r'.*\.cryst\.out'
),
EmptyParser(
name='missing/wien2k', code_name='WIEN2k',
mainfile_name_re=r'.*\.scf'
),
EmptyParser(
name='missing/fhi-aims', code_name='FHI-aims', domain='DFT',
mainfile_name_re=r'.*\.fhiaims'
)
])
parsers.append(BrokenParser())
""" Instantiation and constructor based config of all parsers. """
......
Markdown is supported
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