Code the sheet's new answers; a failed build opens an issue instead of crashing the rebuild
The evening source check stopped (correctly) on two answers the coding rules did not know: - first sighting "2 Greens": a new form option. Coded as Green, with a data flag that keeps the original answer (first_sighting_alias in core/spec/form.yaml). - row label "Unknown" on a bulk-pasted row: added to the entry values in data/dictionary.yaml. Workflow: when `collection update` reports the build failed, skip the rebuild (it would only fail again) and always open the "Source check failed" issue, so new answers are reported, not lost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
This commit is contained in:
@@ -150,6 +150,10 @@ def code_row(r, C):
|
||||
company = company_raw[: -len(suffix)] if left_squad else company_raw
|
||||
if not left_squad and company in ("1 Squadmate", "2 Squadmates") and not (date and date >= F["left_squadmates_asked_from"]):
|
||||
left_squad = None # the form did not offer "left them" yet: unknown, not "stayed together"
|
||||
alias = F.get("first_sighting_alias") or {}
|
||||
if first in alias:
|
||||
flags.append(f"first sighting answered as {first!r}")
|
||||
first = alias[first]
|
||||
pools = F["sighting_pool"]
|
||||
pool = list(pools.get(company, {}).get(direction, [])) + (list(pools["Alone"].get(direction, [])) if left_squad else [])
|
||||
if first and first != "Unsure" and pool and first not in pool:
|
||||
|
||||
Reference in New Issue
Block a user