Skip to content

Commit

Permalink
Move parser dependencies to optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ladinesa committed Nov 28, 2023
1 parent e3d736c commit da1df33
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install .[dev]
pip install .[dev,tests]
- name: mypy
run: |
python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional simulationworkflowschema tests
Expand Down
10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ readme = "README.md"
authors = [{ name = "The NOMAD Authors" }]
license = { text = "Apache-2.0" }
dependencies = [
"nomad-lab[infrastructure]@git+https://github.com/nomad-coe/nomad.git@develop",
"electronicparsers@git+https://github.com/nomad-coe/electronic-parsers.git@develop",
"atomisticparsers@git+https://github.com/nomad-coe/atomistic-parsers.git@develop",
"workflowparsers@git+https://github.com/nomad-coe/workflow-parsers.git@master"
"nomad-lab[infrastructure]@git+https://github.com/nomad-coe/nomad.git@develop"
]

[project.urls]
Expand All @@ -28,6 +25,11 @@ dev = [
'ruff==0.1.4'
]

tests = [
"electronicparsers@git+https://github.com/nomad-coe/electronic-parsers.git@develop",
"atomisticparsers@git+https://github.com/nomad-coe/atomistic-parsers.git@develop",
"workflowparsers@git+https://github.com/nomad-coe/workflow-parsers.git@master"
]

[tool.ruff]
include = ["simulationworkflowschema/*.py", "tests/*.py"]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_simulationworkflowschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def run_parsing(parser_class, filepath):
return archive


# TODO rid of the use of parser
def test_no_workflow():
vasp_archive = run_parsing(VASPParser, 'tests/data/vasp_outcar/OUTCAR_broken')
assert not vasp_archive.workflow2.results.calculations_ref
Expand Down Expand Up @@ -211,7 +212,6 @@ def test_geometry_optimization_workflow():
vasp_archive = run_parsing(
VASPParser, 'tests/data/vasp/vasprun.xml')
sec_workflow = vasp_archive.workflow2
print(sec_workflow)
assert sec_workflow.method.type == 'cell_shape'
assert sec_workflow.results.calculation_result_ref.m_def.name == 'Calculation'
assert sec_workflow.results.final_energy_difference.to('eV').magnitude == approx(0.00012532)
Expand Down

0 comments on commit da1df33

Please sign in to comment.