Skip to content

Commit

Permalink
Update step 8 mocks to step 5
Browse files Browse the repository at this point in the history
  • Loading branch information
eigerx committed Sep 18, 2024
1 parent 8f3b512 commit 23d9500
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 106 deletions.
13 changes: 10 additions & 3 deletions tests/test_prod_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ def check_step1_qpg(self, helper: OutputRepoTests) -> None:
# Make the quantum provenance graph for the first attempt
qg_1 = helper.get_quantum_graph("step1", "i-attempt1")
qpg1 = QuantumProvenanceGraph()
qpg1.assemble_quantum_provenance_graph(helper.butler, [qg_1], collections=["HSC/runs/Prod/step1-i-attempt1"], where="instrument='HSC'")
qpg1.assemble_quantum_provenance_graph(
helper.butler, [qg_1], collections=["HSC/runs/Prod/step1-i-attempt1"], where="instrument='HSC'"
)
qg_1_sum = qpg1.to_summary(helper.butler)

# Loop through the tasks in the dict
Expand Down Expand Up @@ -230,7 +232,7 @@ def check_step1_qpg(self, helper: OutputRepoTests) -> None:
self.assertIsInstance(quantum_summary.data_id["detector"], int)
self.assertEqual(quantum_summary.data_id["visit"], 18202)
self.assertDictEqual(
quantum_summary.runs, {"HSC/runs/Prod/step1-i-attempt1": "failed"}
quantum_summary.runs, {"HSC/runs/Prod/step1-i-attempt1": 'FAILED'}
)
self.assertIsInstance(quantum_summary.messages, list)
for message in quantum_summary.messages:
Expand Down Expand Up @@ -308,7 +310,12 @@ def check_step1_qpg(self, helper: OutputRepoTests) -> None:
# Make an overall QPG and add the recovery attempt to the QPG
qpg = QuantumProvenanceGraph()
qg_2 = helper.get_quantum_graph("step1", "i-attempt2")
qpg.assemble_quantum_provenance_graph(helper.butler, [qg_1, qg_2], collections=["HSC/runs/Prod/step1-i-attempt2", "HSC/runs/Prod/step1-i-attempt1"], where="instrument='HSC'")
qpg.assemble_quantum_provenance_graph(
helper.butler,
[qg_1, qg_2],
collections=["HSC/runs/Prod/step1-i-attempt2", "HSC/runs/Prod/step1-i-attempt1"],
where="instrument='HSC'",
)
qg_sum = qpg.to_summary(helper.butler)

for label, task_summary in qg_sum.tasks.items():
Expand Down
Loading

0 comments on commit 23d9500

Please sign in to comment.