Skip to content

Commit

Permalink
New workflow schema
Browse files Browse the repository at this point in the history
  • Loading branch information
JosePizarro3 committed Oct 10, 2024
1 parent bf48a74 commit 3ad832d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ maintainers = [
]
license = { file = "LICENSE" }
dependencies = [
"nomad-lab@git+https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR.git@ea0e5cbc632a514ea4d7e0bca1fab105d452f94c",
"nomad-simulations@git+https://github.com/nomad-coe/nomad-simulations.git@6a7668bcda0c074f8696eddccf326973acff41ac",
"nomad-lab@git+https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR.git@6b7149a71b2999abbb2225fcb67a5acafc811806",
"nomad-simulations@git+https://github.com/nomad-coe/nomad-simulations.git@0732ea7c9d4c5afcc8b01e3dbfd9235cfc7ffe4c",
]

[project.urls]
Expand Down
1 change: 1 addition & 0 deletions src/nomad_parser_wannier90/parsers/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ def parse(
dft_plus_tb_archive = self._child_archives.get(
'DFTPlusTB_workflow'
)
print(dft_archive, self.archive)
dft_plus_tb = parse_dft_plus_tb_workflow(
dft_archive=dft_archive, tb_archive=self.archive
)
Expand Down
11 changes: 6 additions & 5 deletions src/nomad_parser_wannier90/parsers/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os
from glob import glob

from nomad.datamodel.metainfo.workflow import TaskReference
from nomad.datamodel.metainfo.workflow_new import TaskReference
from nomad_simulations.schema_packages.workflow import DFTPlusTB


Expand Down Expand Up @@ -57,6 +57,7 @@ def parse_dft_plus_tb_workflow(

if not dft_archive.workflow2 or not tb_archive.workflow2:
return
print(dft_archive.workflow2, tb_archive.workflow2)

dft_task = dft_archive.workflow2
tb_task = tb_archive.workflow2
Expand All @@ -66,9 +67,9 @@ def parse_dft_plus_tb_workflow(
]

# Check if main input and output of the `DFTPlusTB` workflow exist
if not dft_task.m_xpath('inputs[0]') or not tb_task.m_xpath('outputs[-1]'):
return dft_plus_tb
dft_plus_tb.inputs = [dft_task.inputs[0]]
dft_plus_tb.outputs = [tb_task.outputs[-1]]
# if not dft_task.m_xpath('inputs[0]') or not tb_task.m_xpath('outputs[-1]'):
# return dft_plus_tb
# dft_plus_tb.inputs = [dft_task.inputs[0]]
# dft_plus_tb.outputs = [tb_task.outputs[-1]]

return dft_plus_tb

1 comment on commit 3ad832d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/nomad_parser_wannier90
   __init__.py4250%3–4
   _version.py11282%5–6
src/nomad_parser_wannier90/parsers
   __init__.py10280%24–26
   band_parser.py513629%4, 23–25, 43–51, 72–111
   dos_parser.py18950%12–14, 24–29
   hr_parser.py483527%4, 19, 27–29, 45–97
   parser.py2161988%8–9, 32–584
   win_parser.py1081080%1–300
src/nomad_parser_wannier90/parsers/utils
   utils.py282318%4, 10–75
src/nomad_parser_wannier90/schema_packages
   __init__.py8275%9–11
   package.py550%1–11
TOTAL50842217% 

Tests Skipped Failures Errors Time
1 0 💤 0 ❌ 1 🔥 13.254s ⏱️

Please sign in to comment.