Cleanup of the TEA parity work: no prose in code, no hacks, everything in its place
1. No prose in code - Remove parity-added comments and docstrings from TEA jobs, analysis and scoring helpers, execution, definitions, and tests. Keep base prose and Ruff and type-checker directives. 2. No hacks, no glued code - Delegate both association cohort queries to persistance.eeg. Keep the predictor mapping and DataFrame shaping in the job, sharing biomarker codes and EEG study IDs with Core. Preserve column names and order, row selection, score filtering, and earliest fitting study. - Use the existing MODELS registry for curve scoring in place of CURVES. Keep GOLD because the generic score job reads it. - Catch lookup, database, and validation failures when loading a preview pipeline, preserving the existing warning. Keep execution-boundary exception handling for submitted tasks, telemetry and shutdown. - Name the association test for the missing-champion case. Preserve its assertion and the other test assertions. 3. Everything in its place - Keep SQL in Persistance, cohort shaping in models, and tests in their existing testpaths. Keep the association fits together with their shared design and result machinery.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
"""The tea_eeg job's graph, sensor, config classes and synthetic EEG scope."""
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
@@ -115,7 +113,6 @@ def test_config_mirrors_match_the_shared_models():
|
||||
assert list(config.model_fields) == list(shared.model_fields)
|
||||
for name, field in shared.model_fields.items():
|
||||
assert config.model_fields[name].default == field.default, name
|
||||
# a wrong value still reaches the shared model's validation
|
||||
with pytest.raises(ValidationError):
|
||||
ExecutionConfig(mode="cloud").model()
|
||||
with pytest.raises(ValidationError):
|
||||
@@ -140,7 +137,7 @@ def test_definitions_load_with_every_job_and_the_sensor():
|
||||
assert tea_eeg_after_ingest.default_status == dg.DefaultSensorStatus.RUNNING
|
||||
|
||||
|
||||
def test_relate_is_a_no_op_until_phase_2():
|
||||
def test_relate_returns_none_without_a_champion():
|
||||
assert tea_jobs.relate() is None
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user