Code the sheet's new answers; report failed builds as issues #8
@@ -48,7 +48,8 @@ jobs:
|
|||||||
REDDIT_CLIENT_SECRET: ${{ secrets.REDDIT_CLIENT_SECRET }}
|
REDDIT_CLIENT_SECRET: ${{ secrets.REDDIT_CLIENT_SECRET }}
|
||||||
run: python -m collection update --report "$RUNNER_TEMP/report.md"
|
run: python -m collection update --report "$RUNNER_TEMP/report.md"
|
||||||
- name: Rebuild the analysis and run tests
|
- 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: |
|
run: |
|
||||||
python -m collection rebuild
|
python -m collection rebuild
|
||||||
npm test
|
npm test
|
||||||
@@ -69,7 +70,7 @@ jobs:
|
|||||||
path: ${{ runner.temp }}/raw-archive
|
path: ${{ runner.temp }}/raw-archive
|
||||||
key: raw-archive-${{ hashFiles('data/manifest.json') }}
|
key: raw-archive-${{ hashFiles('data/manifest.json') }}
|
||||||
- name: Open a pull request with the new data (it merges itself once CI passes)
|
- name: Open a pull request with the new data (it merges itself once CI passes)
|
||||||
if: steps.check.outputs.changed == 'true'
|
if: steps.check.outputs.changed == 'true' && !contains(steps.check.outputs.failed, 'build')
|
||||||
env:
|
env:
|
||||||
ATLAS_BOT_TOKEN: ${{ secrets.ATLAS_BOT_TOKEN }}
|
ATLAS_BOT_TOKEN: ${{ secrets.ATLAS_BOT_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
@@ -83,7 +84,7 @@ jobs:
|
|||||||
git push origin "$branch"
|
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
|
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
|
- name: Report a broken source or new answers
|
||||||
if: steps.check.outputs.failed != ''
|
if: always() && steps.check.outputs.failed != ''
|
||||||
env:
|
env:
|
||||||
ATLAS_BOT_TOKEN: ${{ secrets.ATLAS_BOT_TOKEN }}
|
ATLAS_BOT_TOKEN: ${{ secrets.ATLAS_BOT_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -150,6 +150,10 @@ def code_row(r, C):
|
|||||||
company = company_raw[: -len(suffix)] if left_squad else company_raw
|
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"]):
|
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"
|
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"]
|
pools = F["sighting_pool"]
|
||||||
pool = list(pools.get(company, {}).get(direction, [])) + (list(pools["Alone"].get(direction, [])) if left_squad else [])
|
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:
|
if first and first != "Unsure" and pool and first not in pool:
|
||||||
|
|||||||
@@ -153,5 +153,10 @@ sighting_pool:
|
|||||||
1 Squadmate: { East: [Green, Orange, Red], West: [Red, Brown, Green], Center: [Red, Brown] }
|
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] }
|
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
|
# How a bulk-pasted row's attempt answer is read
|
||||||
attempt_words: { first: 1, second: 2, third: 3, fourth: 4, fifth: 5 }
|
attempt_words: { first: 1, second: 2, third: 3, fourth: 4, fifth: 5 }
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ columns:
|
|||||||
For spreadsheet runs, the sheet's own row label: "Form" for a form submission (it has a timestamp);
|
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
|
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.
|
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:
|
bot_mode:
|
||||||
type: text
|
type: text
|
||||||
description: >-
|
description: >-
|
||||||
|
|||||||
Reference in New Issue
Block a user