Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
215a1934
Commit
215a1934
authored
Mar 12, 2021
by
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
Changes
45
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/normalizing/test_system.py
View file @
215a1934
...
...
@@ -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
...
...
tests/normalizing/test_workflow.py
View file @
215a1934
...
...
@@ -33,7 +33,7 @@ def workflow_archive():
def
test_no_workflow
(
workflow_archive
):
vasp_archive
=
workflow_archive
(
'parsers/vasp
outcar
'
,
'tests/data/parsers/vasp_outcar/OUTCAR'
)
'parsers/vasp'
,
'tests/data/parsers/vasp_outcar/OUTCAR
_broken
'
)
assert
vasp_archive
.
section_workflow
is
None
...
...
tests/parsing/test_parsing.py
View file @
215a1934
...
...
@@ -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/vasp
outcar
'
,
'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
=
11
5
correct_num_output_files
=
11
6
class
TestBackend
(
object
):
...
...
tests/processing/test_data.py
View file @
215a1934
...
...
@@ -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
...
...
tests/test_search.py
View file @
215a1934
...
...
@@ -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'
)
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment