Commit 215a1934 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Merge branch 'parser-move' into 'v0.10.0'

Parser move

See merge request !280
parents d8984d35 373fd704
Pipeline #95607 passed with stages
in 22 minutes and 48 seconds
......@@ -241,7 +241,7 @@ def test_vasp_incar_system():
archive = run_normalize(archive)
expected_value = 'SrTiO3' # material's formula in vasp.xml
backend_value = archive.section_run[0].section_method[0].x_vasp_incar_SYSTEM
backend_value = archive.section_run[0].section_method[0].x_vasp_incar_in['SYSTEM']
assert expected_value == backend_value
......
......@@ -33,7 +33,7 @@ def workflow_archive():
def test_no_workflow(workflow_archive):
vasp_archive = workflow_archive(
'parsers/vaspoutcar', 'tests/data/parsers/vasp_outcar/OUTCAR')
'parsers/vasp', 'tests/data/parsers/vasp_outcar/OUTCAR_broken')
assert vasp_archive.section_workflow is None
......
......@@ -41,7 +41,7 @@ parser_examples = [
('parsers/exciting', 'tests/data/parsers/exciting/nitrogen/INFO.OUT_carbon'),
('parsers/vasp', 'tests/data/parsers/vasp/vasp.xml'),
('parsers/vasp', 'tests/data/parsers/vasp_compressed/vasp.xml.gz'),
('parsers/vaspoutcar', 'tests/data/parsers/vasp_outcar/OUTCAR'),
('parsers/vasp', 'tests/data/parsers/vasp_outcar/OUTCAR'),
('parsers/fhi-aims', 'tests/data/parsers/fhi-aims/aims.out'),
('parsers/cp2k', 'tests/data/parsers/cp2k/si_bulk8.out'),
('parsers/crystal', 'tests/data/parsers/crystal/si.out'),
......@@ -85,7 +85,7 @@ for parser, mainfile in parser_examples:
parser_examples = fixed_parser_examples
correct_num_output_files = 115
correct_num_output_files = 116
class TestBackend(object):
......
......@@ -121,6 +121,7 @@ def assert_processing(upload: Upload, published: bool = False):
# check some domain metadata
assert entry_metadata.n_atoms > 0
assert len(entry_metadata.atoms) > 0
assert len(entry_metadata.processing_errors) == 0
assert upload.get_calc(calc.calc_id) is not None
......@@ -532,6 +533,8 @@ def test_task_failure(monkeypatch, uploaded, task, proc_infra, test_user, with_e
assert 'section_metadata' in calc_archive
assert calc_archive['section_metadata']['dft']['code_name'] not in [
config.services.unavailable_value, config.services.not_processed_value]
if task != 'cleanup':
assert len(calc_archive['section_metadata']['processing_errors']) > 0
assert 'processing_logs' in calc_archive
if task != 'parsing':
assert 'section_run' in calc_archive
......
......@@ -339,7 +339,7 @@ def assert_search_upload(
if __name__ == '__main__':
from test_datamodel import generate_calc # pylint: disable=import-error
from .test_datamodel import generate_calc
from elasticsearch.helpers import bulk
import sys
print('Generate index with random example calculation data. First arg is number of items')
......
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