ADOS-2 scoring step in the indicators cycle, run after the document import commits; EEG analysis ordered before the relation steps

This commit is contained in:
ulises
2026-11-22 22:01:50 -06:00
parent 430d165594
commit eb88cb7eb0
10 changed files with 139 additions and 9 deletions
+3 -3
View File
@@ -58,15 +58,15 @@ def fake_analysis(tea_base):
@pytest.mark.parametrize("proyecto", ["cacu", "cama", "tea"])
def test_the_eeg_analysis_runs_before_the_silver_load(proyecto):
"""Pins down: `load` depends on `analyze_eeg`, which needs only the migrated schema.
"""Pins down: `load` depends on `analyze_eeg`, which needs only the migrated schema and the quick ADOS-2 scoring.
Fails if `load` stops waiting for the analysis (the cycle would load an EEG's old analysis and pick the new one up
only on the next cycle), or the analysis starts waiting for steps it doesn't need.
only on the next cycle), or the analysis starts waiting for steps other than the migration and the scoring.
"""
dr = driver.Builder().with_modules(cycle).with_config({"with_cohorts": proyecto == "cacu"}).build()
deps = {n.name: {d.name for d in n.dependencies} - {"ctx"} for n in dr.graph.get_nodes() if n.name != "ctx"}
assert "analyze_eeg" in deps["load"]
assert deps["analyze_eeg"] == {"migrate"}
assert deps["analyze_eeg"] == {"migrate", "score_ados2"}
order = steps_of(proyecto)
assert order.index("analyze_eeg") < order.index("load")