mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2026-03-24 22:16:31 +01:00
feat: add Budget Mode with price cache infrastructure and stale price warnings
This commit is contained in:
parent
1aa8e4d7e8
commit
ec23775205
42 changed files with 6976 additions and 2753 deletions
18
.github/workflows/build-similarity-cache.yml
vendored
18
.github/workflows/build-similarity-cache.yml
vendored
|
|
@ -104,6 +104,18 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
- name: Refresh price data and write to parquet
|
||||
if: steps.check_cache.outputs.needs_build == 'true'
|
||||
run: |
|
||||
# refresh_prices_parquet() downloads fresh Scryfall bulk data and rebuilds the cache
|
||||
python -c "from code.file_setup.setup import refresh_prices_parquet; refresh_prices_parquet(print)"
|
||||
|
||||
if [ ! -f "card_files/prices_cache.json" ]; then
|
||||
echo "ERROR: Price cache not created"
|
||||
exit 1
|
||||
fi
|
||||
echo "Price data refreshed successfully"
|
||||
|
||||
# Debug step - uncomment if needed to inspect Parquet file contents
|
||||
# - name: Debug - Inspect Parquet file after tagging
|
||||
# if: steps.check_cache.outputs.needs_build == 'true'
|
||||
|
|
@ -264,9 +276,11 @@ jobs:
|
|||
## Files
|
||||
- `card_files/similarity_cache.parquet` - Pre-computed card similarity cache
|
||||
- `card_files/similarity_cache_metadata.json` - Cache metadata
|
||||
- `card_files/processed/all_cards.parquet` - Tagged card database
|
||||
- `card_files/processed/all_cards.parquet` - Tagged card database (with prices)
|
||||
- `card_files/processed/commander_cards.parquet` - Commander-only cache (fast lookups)
|
||||
- `card_files/processed/.tagging_complete.json` - Tagging status
|
||||
- `card_files/prices_cache.json` - Scryfall price cache
|
||||
- `card_files/prices_cache.json.ts` - Per-card price timestamps (if present)
|
||||
EOF
|
||||
|
||||
# Start with clean index
|
||||
|
|
@ -278,6 +292,8 @@ jobs:
|
|||
git add -f card_files/processed/all_cards.parquet
|
||||
git add -f card_files/processed/commander_cards.parquet
|
||||
git add -f card_files/processed/.tagging_complete.json
|
||||
git add -f card_files/prices_cache.json
|
||||
git add -f card_files/prices_cache.json.ts 2>/dev/null || true
|
||||
git add -f README-cache.md
|
||||
|
||||
# Create a new commit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue