Code the sheet's new answers; report failed builds as issues #8

Merged
kathleen merged 2 commits from fix/new-sheet-answers-1117 into main 2026-11-17 23:49:04 +00:00
4 changed files with 13 additions and 3 deletions
Showing only changes of commit 47da9f1f82 - Show all commits
+3 -2
View File
@@ -48,7 +48,8 @@ jobs:
REDDIT_CLIENT_SECRET: ${{ secrets.REDDIT_CLIENT_SECRET }}
run: python -m collection update --report "$RUNNER_TEMP/report.md"
- name: Rebuild the analysis and run tests
if: steps.check.outputs.changed == 'true'
# not when the combined runs failed validation: the issue below reports the new answers instead
if: steps.check.outputs.changed == 'true' && !contains(steps.check.outputs.failed, 'build')
run: |
python -m collection rebuild
npm test
@@ -83,7 +84,7 @@ jobs:
git push origin "$branch"
python -m collection forge open-pr --head "$branch" --title "New data from the community sources" --body-file "$RUNNER_TEMP/report.md" --automerge
- name: Report a broken source or new answers
if: steps.check.outputs.failed != ''
if: always() && steps.check.outputs.failed != ''
env:
ATLAS_BOT_TOKEN: ${{ secrets.ATLAS_BOT_TOKEN }}
run: |
+4
View File
@@ -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:
+5
View File
@@ -153,5 +153,10 @@ sighting_pool:
1 Squadmate: { East: [Green, Orange, Red], West: [Red, Brown, Green], Center: [Red, Brown] }
2 Squadmates: { East: [Red, Orange], West: [Green, Brown, Red], Center: [Red, Brown] }
# First-sighting answers that are not a single colour: coded as this colour, and the row is flagged with the
# original answer (data_flags), so nothing is lost.
first_sighting_alias:
"2 Greens": Green
# How a bulk-pasted row's attempt answer is read
attempt_words: { first: 1, second: 2, third: 3, fourth: 4, fifth: 5 }
+1 -1
View File
@@ -81,7 +81,7 @@ columns:
For spreadsheet runs, the sheet's own row label: "Form" for a form submission (it has a timestamp);
bulk-pasted logs keep the label they were pasted with. Bulk logs record every run of the players who kept
them, so they are the least selectively reported rows. Empty for other sources.
values: [Form, Data Import, BulkUpload3, Manual Upload, Historical import, Unknown import]
values: [Form, Data Import, BulkUpload3, Manual Upload, Historical import, Unknown import, Unknown]
bot_mode:
type: text
description: >-