Skip to content

Commit

Permalink
Fix resolve_inputs_outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
JosePizarro3 committed Oct 10, 2024
1 parent 7f46488 commit f337b73
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions src/nomad_simulations/schema_packages/workflow/dft_plus_tb.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,19 @@ def resolve_inputs_outputs(self) -> None:
"""
Resolve the `inputs` and `outputs` of the `DFTPlusTB` workflow.
"""
input = extract_section(self.tasks[0], ['task', 'inputs[0]', 'section'])
print(
self.tasks[0],
extract_section(self.tasks[0], ['task']),
extract_section(self.tasks[0], ['task', 'inputs[0]']),
extract_section(self.tasks[0], ['task', 'inputs[0]', 'section']),
)
if not input:
# Input system reference
inputs = extract_section(self.tasks[0], ['task', 'inputs'], full_list=True)
if not inputs:
return None
print(input)
self.inputs = [LinkReference(name='Input Model System', section=input)]
input_section = inputs[0].section
self.inputs = [LinkReference(name='Input Model System', section=input_section)]

output = extract_section(self.tasks[1], ['task', 'outputs[-1]', 'section'])
if not output:
# Output TB data reference
outputs = extract_section(self.tasks[0], ['task', 'outputs'], full_list=True)
if not outputs:
return None
print(output)
self.outputs = [LinkReference(name='Output TB Data', section=output)]
output_section = outputs[0].section
self.outputs = [LinkReference(name='Output TB Data', section=output_section)]

# TODO check if implementing overwritting the FermiLevel.value in the TB entry from the DFT entry

Expand Down

1 comment on commit f337b73

@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_simulations
   __init__.py4250%3–4
   _version.py11282%5–6
src/nomad_simulations/schema_packages
   __init__.py15287%39–41
   atoms_state.py19012932%13–15, 159–179, 197–232, 245–276, 279–297, 344–355, 358–372, 491–506, 518–526, 529–550, 608–615, 627–634, 637–643
   basis_set.py24015336%8–9, 78–79, 115–119, 122–133, 162–165, 168–169, 172–185, 208, 264, 270–271, 275–279, 290–294, 298–302, 306–327, 335, 370–381, 385–397, 417–418, 453–466, 470, 475–476, 513–521, 530, 562–589, 595–600, 603–618, 647–698
   general.py894253%4–7, 51–54, 121, 185, 214–216, 228–286, 289–311
   model_method.py26915443%10–12, 73, 92, 125, 171–174, 177–184, 276–277, 297, 318–339, 355–381, 384–401, 493, 516–559, 562–587, 637–645, 704–706, 732–753, 756–762, 780, 791, 833–840, 878, 897, 977, 1034, 1109, 1223
   model_system.py31722031%25–27, 182–190, 194–200, 283–291, 302–319, 322, 373–392, 404–413, 427–458, 469–486, 489–492, 620–647, 665–747, 750–766, 832–836, 839–860, 1065–1103, 1106–1145
   numerical_settings.py25919325%12–14, 36, 147, 175–191, 213–284, 374–394, 410–425, 444–466, 469–496, 561–582, 594–610, 632–662, 680–742, 745–766, 792–794, 809–827, 830–835, 889
   outputs.py1206843%9–10, 153–159, 169–173, 183–187, 190–198, 241–259, 276–309, 312–329, 362, 381
   physical_property.py1024952%20–22, 46–62, 200–202, 223, 235–238, 251, 258, 265–291, 301–303, 306–309, 331–333
   variables.py862176%8–10, 63–70, 73–76, 98, 121, 145, 167, 189, 211, 233, 256, 272–273, 276
src/nomad_simulations/schema_packages/properties
   band_gap.py513237%8–10, 79–92, 104–126, 129–144
   band_structure.py1237638%9–11, 53–55, 58, 131–132, 144–159, 174–199, 209–218, 232–265, 274–286, 289–308, 321–322, 325, 372–373, 378
   energies.py421857%7–9, 36, 57, 77–79, 82, 99–100, 103, 115–116, 119, 130–131, 134
   fermi_surface.py17759%7–9, 34–37, 40
   forces.py22864%7–9, 36, 56, 75–76, 79
   greens_function.py995247%7–9, 135–137, 149–179, 182–189, 210–211, 214, 235–236, 239, 260–261, 264, 349–355, 365–367, 376–384, 387–403
   hopping_matrix.py291162%7–9, 50–53, 58, 88–91, 94
   permittivity.py483233%7–9, 53–56, 59–62, 71–94, 97–105
   spectral_profile.py26021517%9–11, 39–40, 49–51, 54–60, 80, 94–106, 109–112, 176–177, 199–300, 313–345, 356–368, 382–400, 415–463, 466–502, 521–523, 526, 555–557, 568–593, 598–604
   thermodynamics.py752764%7–9, 35, 56, 72, 81, 90, 101, 110, 137, 147, 157, 172–174, 177, 193, 213–215, 218, 234, 254–256, 259
src/nomad_simulations/schema_packages/utils
   utils.py745427%8–16, 53–63, 70–79, 83–89, 92–97, 101, 105, 122–127, 144–150, 159–161
src/nomad_simulations/schema_packages/workflow
   base_workflows.py512551%5–6, 28–31, 60, 98–103, 120–137, 140
   dft_plus_tb.py432640%4–5, 73–84, 90–120
   single_point.py281739%6–7, 50–77
TOTAL2678163539% 

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 2 🔥 2.011s ⏱️

Please sign in to comment.