Repository navigation
Automate TigerTag JSON database updates - #33
TigerTag-Project wants to merge 1 commit into
Conversation
- download_json.py now follows the sync strategy of the TigerTag RFID Guide: fetch the last_update manifest, download only the tables whose timestamp changed, use the TigerTag API with the GitHub mirror as fallback, and validate each table before replacing it - Tables are written indented so updates produce readable diffs - Add --force and --summary options; the summary lists added, removed and changed entries per table - Add a weekly workflow that syncs the tables, runs pytest and opens a pull request when something changed
836936a to
9179f35
Compare
|
Hi @suchmememanyskill, we're the TigerTag team. This PR automates the TigerTag JSON database updates, so future updates no longer need manual PRs like #17. We tested the workflow end-to-end on our fork before submitting it: it synced all 7 tables from the TigerTag API, ran To enable it after merging, one setting is needed: Settings → Actions → General → Workflow permissions → "Allow GitHub Actions to create and approve pull requests". The workflow then runs every Monday at 06:00 UTC, and can also be started by hand from the Actions tab. Two related PRs are also open:
Happy to adjust anything! |
Keeping the TigerTag tables in
src/tag/tigertag/database/up to date currently means runningdownload_json.pyby hand and opening a PR (as in #17 and #31). This PR automates it.download_json.pyIt now follows the sync strategy described in the TigerTag RFID Guide (section 2.0):
last_updatemanifest first, and only downloads the tables whose timestamp changed. The manifest is stored asdatabase/last_update.json.--forcere-downloads every table, and--summary FILEwrites a markdown list of added, removed and changed entries.The parser is unchanged:
registry.pyreads the same files.Workflow
.github/workflows/update-tigertag-json.ymlworkflow_dispatch).pytest, then opens (or updates) a pull request from theautomation/update-tigertag-jsonbranch, with the change summary as the description.GITHUB_TOKENdo not trigger thepytestworkflow.One setting is needed for the workflow to open pull requests: Settings → Actions → General → Workflow permissions → tick "Allow GitHub Actions to create and approve pull requests".
Notes
last_update.jsonexists yet, and reformats them. Its PR will therefore also include whatever Update TigerTag JSON database #31 has not merged yet.