From 6ecd45117fe17c4818e06647da668ffe39a59b2a Mon Sep 17 00:00:00 2001 From: matt Date: Sat, 4 Apr 2026 20:25:33 -0700 Subject: [PATCH] fix: include ck_prices_cache.json in similarity cache build and download flows --- .env.example | 2 +- .github/workflows/build-similarity-cache.yml | 2 ++ CHANGELOG.md | 5 +++++ code/web/routes/setup.py | 2 ++ code/web/services/orchestrator.py | 3 +++ docker-compose.yml | 2 +- dockerhub-docker-compose.yml | 2 +- docs/releases/v4.6.2.md | 5 +++++ pyproject.toml | 2 +- 9 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 docs/releases/v4.6.2.md diff --git a/.env.example b/.env.example index 344c891..79a3590 100644 --- a/.env.example +++ b/.env.example @@ -13,7 +13,7 @@ # HOST=0.0.0.0 # Uvicorn bind host (only when APP_MODE=web). # PORT=8080 # Uvicorn port. # WORKERS=1 # Uvicorn worker count. -APP_VERSION=v4.6.1 # Matches dockerhub compose. +APP_VERSION=v4.6.2 # Matches dockerhub compose. ############################ # Theming diff --git a/.github/workflows/build-similarity-cache.yml b/.github/workflows/build-similarity-cache.yml index 15faab2..4d0343a 100644 --- a/.github/workflows/build-similarity-cache.yml +++ b/.github/workflows/build-similarity-cache.yml @@ -280,6 +280,7 @@ jobs: - `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/ck_prices_cache.json` - Card Kingdom price cache - `card_files/prices_cache.json.ts` - Per-card price timestamps (if present) EOF @@ -293,6 +294,7 @@ jobs: 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/ck_prices_cache.json 2>/dev/null || true git add -f card_files/prices_cache.json.ts 2>/dev/null || true git add -f README-cache.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 03d814d..eb322bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,11 @@ _No unreleased changes yet_ ### Removed _No unreleased changes yet_ +## [4.6.2] - 2026-04-04 +### Fixed +- **CK prices missing after GitHub cache download**: `ck_prices_cache.json` was not included in the files committed to `similarity-cache-data` by the build workflow, nor fetched by the `Download from GitHub` button or the orchestrator auto-download flow. All three paths now include the file (graceful 404 handling preserves backward compatibility with existing cache branches). +- **`commander_cards.parquet` missing from orchestrator download**: The orchestrator's auto-download list was missing `commander_cards.parquet`, which the route handler already included. Both lists are now consistent. + ## [4.6.1] - 2026-04-04 ### Added - **Card Kingdom prices**: All price displays now show both TCGPlayer (TCG) and Card Kingdom (CK) prices side by side diff --git a/code/web/routes/setup.py b/code/web/routes/setup.py index f2e58e3..109a5a4 100644 --- a/code/web/routes/setup.py +++ b/code/web/routes/setup.py @@ -138,6 +138,8 @@ async def download_github(): ("card_files/processed/.tagging_complete.json", "card_files/processed/.tagging_complete.json"), ("card_files/similarity_cache.parquet", "card_files/similarity_cache.parquet"), ("card_files/similarity_cache_metadata.json", "card_files/similarity_cache_metadata.json"), + ("card_files/prices_cache.json", "card_files/prices_cache.json"), + ("card_files/ck_prices_cache.json", "card_files/ck_prices_cache.json"), ] downloaded = [] diff --git a/code/web/services/orchestrator.py b/code/web/services/orchestrator.py index 18136ce..9d10775 100644 --- a/code/web/services/orchestrator.py +++ b/code/web/services/orchestrator.py @@ -1377,9 +1377,12 @@ def _ensure_setup_ready(out, force: bool = False) -> None: base_url = "https://raw.githubusercontent.com/mwisnowski/mtg_python_deckbuilder/similarity-cache-data" files_to_download = [ ("card_files/processed/all_cards.parquet", "card_files/processed/all_cards.parquet"), + ("card_files/processed/commander_cards.parquet", "card_files/processed/commander_cards.parquet"), ("card_files/processed/.tagging_complete.json", "card_files/processed/.tagging_complete.json"), ("card_files/similarity_cache.parquet", "card_files/similarity_cache.parquet"), ("card_files/similarity_cache_metadata.json", "card_files/similarity_cache_metadata.json"), + ("card_files/prices_cache.json", "card_files/prices_cache.json"), + ("card_files/ck_prices_cache.json", "card_files/ck_prices_cache.json"), ] download_success = True diff --git a/docker-compose.yml b/docker-compose.yml index 3d31148..281bff8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -144,7 +144,7 @@ services: # WEB_THEME_FILTER_PREWARM: "0" WEB_AUTO_ENFORCE: "0" # 1=auto-run compliance export after builds WEB_CUSTOM_EXPORT_BASE: "" # Optional: custom base dir for deck export artifacts - APP_VERSION: "v4.6.1" # Displayed version label (set per release/tag) + APP_VERSION: "v4.6.2" # Displayed version label (set per release/tag) # ------------------------------------------------------------------ # Misc / Land Selection (Step 7) Environment Tuning diff --git a/dockerhub-docker-compose.yml b/dockerhub-docker-compose.yml index 2de716c..60decae 100644 --- a/dockerhub-docker-compose.yml +++ b/dockerhub-docker-compose.yml @@ -146,7 +146,7 @@ services: # WEB_THEME_FILTER_PREWARM: "0" WEB_AUTO_ENFORCE: "0" # 1=auto-run compliance export after builds WEB_CUSTOM_EXPORT_BASE: "" # Optional: custom base dir for deck export artifacts - APP_VERSION: "v4.6.1" # Displayed version label (set per release/tag) + APP_VERSION: "v4.6.2" # Displayed version label (set per release/tag) # ------------------------------------------------------------------ # Misc / Land Selection (Step 7) Environment Tuning diff --git a/docs/releases/v4.6.2.md b/docs/releases/v4.6.2.md new file mode 100644 index 0000000..9e3c17c --- /dev/null +++ b/docs/releases/v4.6.2.md @@ -0,0 +1,5 @@ +# MTG Python Deckbuilder v4.6.2 + +## Fixed +- **CK prices missing after GitHub cache download**: `ck_prices_cache.json` was not committed to the `similarity-cache-data` branch by the build workflow, and was not fetched by the "Download from GitHub" button or the orchestrator auto-download. All three paths now include it (graceful 404 fallback preserves backward compatibility). +- **`commander_cards.parquet` missing from orchestrator download**: The orchestrator's download list was missing this file, creating an inconsistency with the route handler. Both lists are now in sync. diff --git a/pyproject.toml b/pyproject.toml index a3a4518..0b45b65 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "mtg-deckbuilder" -version = "4.6.1" +version = "4.6.2" description = "A command-line tool for building and analyzing Magic: The Gathering decks" readme = "README.md" license = {file = "LICENSE"}