fix: align research metadata with live WorldQuant responses
This commit is contained in:
@@ -27,6 +27,17 @@ def scope_of(settings):
|
||||
}
|
||||
|
||||
|
||||
def seed_settings(snapshot):
|
||||
"""Decode executable settings, retaining returned historical dates in the parent snapshot.
|
||||
|
||||
startDate/endDate are result window metadata absent from POST settings. Unknown
|
||||
execution parameters still fail strict validation rather than being discarded.
|
||||
"""
|
||||
return SimulationSettings.model_validate(
|
||||
{k: v for k, v in snapshot.items() if k not in ("startDate", "endDate")}
|
||||
)
|
||||
|
||||
|
||||
class Experiments:
|
||||
def __init__(self, db):
|
||||
self.db = db
|
||||
@@ -315,7 +326,7 @@ class Experiments:
|
||||
[parent_snapshot] if parent_snapshot is not None else await self.parents([body.alpha_id], [])
|
||||
)
|
||||
original = parents[0]
|
||||
base = SimulationSettings.model_validate(original["settings"])
|
||||
base = seed_settings(original["settings"])
|
||||
expression = original["expression"]
|
||||
snapshots, _ = await self.inputs(body.input_ids)
|
||||
groups = defaultdict(list)
|
||||
|
||||
Reference in New Issue
Block a user