From 641b30595571c2c972f80f1301bf5cf35dcb366e Mon Sep 17 00:00:00 2001 From: matt Date: Fri, 3 Oct 2025 11:30:26 -0700 Subject: [PATCH] chore: prepare release 2.4.1 --- .env.example | 2 +- CHANGELOG.md | 18 +++++++++++------- RELEASE_NOTES_TEMPLATE.md | 25 ++++--------------------- docker-compose.yml | 2 +- dockerhub-docker-compose.yml | 2 +- docs/releases/v2.4.1.md | 30 ++++++++++++++++++++++++++++++ pyproject.toml | 2 +- 7 files changed, 49 insertions(+), 32 deletions(-) create mode 100644 docs/releases/v2.4.1.md diff --git a/.env.example b/.env.example index b704c1d..54fab46 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=v2.4.0 # Matches dockerhub compose. +APP_VERSION=v2.4.1 # Matches dockerhub compose. ############################ # Theming diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ffe99c..a9ba195 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,9 +14,13 @@ This format follows Keep a Changelog principles and aims for Semantic Versioning ## [Unreleased] ### Summary +- _TBD_ + +## [2.4.1] - 2025-10-03 +### Summary - Theme catalog groundwork for supplemental/custom themes now ships with a generator script and focused test coverage. - Web builder gains an Additional Themes section with fuzzy suggestions and strict/permissive toggles for user-supplied tags. - - Compose manifests and docs include new environment toggles for random reroll throttling, telemetry/logging, homepage commander tile, and optional random rate limiting. +- Compose manifests and docs include new environment toggles for random reroll throttling, telemetry/logging, homepage commander tile, and optional random rate limiting. ### Added - Script `python -m code.scripts.generate_theme_catalog` emits a normalized `theme_catalog.csv` with commander/card counts, deterministic ordering, and a reproducible version hash for supplemental theme inputs. @@ -29,12 +33,12 @@ This format follows Keep a Changelog principles and aims for Semantic Versioning - Added targeted tests for additional theme parsing, strict failure handling, and permissive warning coverage. - Web New Deck modal renders an “Additional Themes” HTMX partial supporting add/remove, suggestion adoption, mode switching, limit enforcement, and accessible live messaging (gated by `ENABLE_CUSTOM_THEMES`). - Supplemental theme telemetry now records commander/user/merged theme payloads, exposes `/status/theme_metrics` for diagnostics, and surfaces user theme weighting via structured `user_theme_applied` logs and the diagnostics dashboard panel. - - Environment variables surfaced in compose, `.env.example`, and docs: - - `SHOW_COMMANDERS` (default `1`): show the Commanders browser tile. - - `RANDOM_REROLL_THROTTLE_MS` (default `350`): client guard to prevent rapid rerolls. - - `RANDOM_STRUCTURED_LOGS` (default `0`): emit structured JSON logs for random builds. - - `RANDOM_TELEMETRY` (default `0`): enable lightweight timing/attempt counters for diagnostics. - - `RATE_LIMIT_ENABLED` (default `0`), `RATE_LIMIT_WINDOW_S` (`10`), `RATE_LIMIT_RANDOM` (`10`), `RATE_LIMIT_BUILD` (`10`), `RATE_LIMIT_SUGGEST` (`30`): optional server-side rate limiting for random endpoints. + - Environment variables surfaced in compose, `.env.example`, and docs: + - `SHOW_COMMANDERS` (default `1`): show the Commanders browser tile. + - `RANDOM_REROLL_THROTTLE_MS` (default `350`): client guard to prevent rapid rerolls. + - `RANDOM_STRUCTURED_LOGS` (default `0`): emit structured JSON logs for random builds. + - `RANDOM_TELEMETRY` (default `0`): enable lightweight timing/attempt counters for diagnostics. + - `RATE_LIMIT_ENABLED` (default `0`), `RATE_LIMIT_WINDOW_S` (`10`), `RATE_LIMIT_RANDOM` (`10`), `RATE_LIMIT_BUILD` (`10`), `RATE_LIMIT_SUGGEST` (`30`): optional server-side rate limiting for random endpoints. ### Changed - Run-config exports now surface `userThemes` and `themeCatalogVersion` metadata while retaining legacy fields; headless imports accept both aliases without changing hash-equivalent payloads when no user themes are present. diff --git a/RELEASE_NOTES_TEMPLATE.md b/RELEASE_NOTES_TEMPLATE.md index 6db5533..32e1bd5 100644 --- a/RELEASE_NOTES_TEMPLATE.md +++ b/RELEASE_NOTES_TEMPLATE.md @@ -1,30 +1,13 @@ # MTG Python Deckbuilder ${VERSION} ## Summary -- Theme catalog groundwork for supplemental/custom themes now ships with a generator script and focused test coverage. -- Web builder gains an Additional Themes section with fuzzy suggestions and strict/permissive toggles for user-supplied tags. - - Compose manifests and docs include new environment toggles for random reroll throttling, telemetry/logging, homepage commander tile, and optional random rate limiting. +- _TBD_ ## Added -- Script `python -m code.scripts.generate_theme_catalog` emits a normalized `theme_catalog.csv` with commander/card counts, deterministic ordering, and a reproducible version hash for supplemental theme inputs. -- Unit tests cover catalog generation on fixture CSVs and verify normalization removes duplicate theme variants. -- Loader `load_theme_catalog()` memoizes CSV parsing, validates required columns, and exposes typed entries plus version metadata for runtime integrations. -- Unit tests exercise loader success, empty-file fallback, and malformed-column scenarios. -- Fuzzy theme matcher builds a trigram-backed index with Levenshtein + Sequence similarity scoring, threshold constants, and resolution utilities for supplemental theme inputs. -- Unit tests validate normalization, typo recovery, suggestion quality, and enforce a basic performance ceiling for 400+ theme catalogs. -- Headless configs accept `additional_themes` + `theme_match_mode` with catalog-backed fuzzy resolution, strict/permissive enforcement, and persistence into exported run configs and diagnostics. -- Added targeted tests for additional theme parsing, strict failure handling, and permissive warning coverage. -- Web New Deck modal renders an “Additional Themes” HTMX partial supporting add/remove, suggestion adoption, mode switching, limit enforcement, and accessible live messaging (gated by `ENABLE_CUSTOM_THEMES`). -- Supplemental theme telemetry now records commander/user/merged theme payloads, exposes `/status/theme_metrics` for diagnostics, and surfaces user theme weighting via structured `user_theme_applied` logs and the diagnostics dashboard panel. - - Environment variables surfaced in compose, `.env.example`, and docs: - - `SHOW_COMMANDERS` (default `1`): show the Commanders browser tile. - - `RANDOM_REROLL_THROTTLE_MS` (default `350`): client guard to prevent rapid rerolls. - - `RANDOM_STRUCTURED_LOGS` (default `0`): emit structured JSON logs for random builds. - - `RANDOM_TELEMETRY` (default `0`): enable lightweight timing/attempt counters for diagnostics. - - `RATE_LIMIT_ENABLED` (default `0`), `RATE_LIMIT_WINDOW_S` (`10`), `RATE_LIMIT_RANDOM` (`10`), `RATE_LIMIT_BUILD` (`10`), `RATE_LIMIT_SUGGEST` (`30`): optional server-side rate limiting for random endpoints. +- _TBD_ ## Changed -- Run-config exports now surface `userThemes` and `themeCatalogVersion` metadata while retaining legacy fields; headless imports accept both aliases without changing hash-equivalent payloads when no user themes are present. +- _TBD_ ## Fixed -- Additional Themes now falls back to `theme_list.json` when `theme_catalog.csv` is absent, restoring resolution, removal, and build application for user-supplied themes across web and headless flows. +- _TBD_ diff --git a/docker-compose.yml b/docker-compose.yml index b221204..f4f4b92 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -102,7 +102,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: "2.4.0" # Displayed version label (set per release/tag) + APP_VERSION: "2.4.1" # 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 2477f28..af206e1 100644 --- a/dockerhub-docker-compose.yml +++ b/dockerhub-docker-compose.yml @@ -104,7 +104,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: "2.4.0" # Displayed version label (set per release/tag) + APP_VERSION: "2.4.1" # Displayed version label (set per release/tag) # ------------------------------------------------------------------ # Misc / Land Selection (Step 7) Environment Tuning diff --git a/docs/releases/v2.4.1.md b/docs/releases/v2.4.1.md new file mode 100644 index 0000000..31b9fe5 --- /dev/null +++ b/docs/releases/v2.4.1.md @@ -0,0 +1,30 @@ +# MTG Python Deckbuilder v2.4.1 + +## Summary +- Theme catalog groundwork for supplemental/custom themes now ships with a generator script and focused test coverage. +- Web builder gains an Additional Themes section with fuzzy suggestions and strict/permissive toggles for user-supplied tags. +- Compose manifests and docs include new environment toggles for random reroll throttling, telemetry/logging, homepage commander tile, and optional random rate limiting. + +## Added +- Script `python -m code.scripts.generate_theme_catalog` emits a normalized `theme_catalog.csv` with commander/card counts, deterministic ordering, and a reproducible version hash for supplemental theme inputs. +- Unit tests cover catalog generation on fixture CSVs and verify normalization removes duplicate theme variants. +- Loader `load_theme_catalog()` memoizes CSV parsing, validates required columns, and exposes typed entries plus version metadata for runtime integrations. +- Unit tests exercise loader success, empty-file fallback, and malformed-column scenarios. +- Fuzzy theme matcher builds a trigram-backed index with Levenshtein + Sequence similarity scoring, threshold constants, and resolution utilities for supplemental theme inputs. +- Unit tests validate normalization, typo recovery, suggestion quality, and enforce a basic performance ceiling for 400+ theme catalogs. +- Headless configs accept `additional_themes` + `theme_match_mode` with catalog-backed fuzzy resolution, strict/permissive enforcement, and persistence into exported run configs and diagnostics. +- Added targeted tests for additional theme parsing, strict failure handling, and permissive warning coverage. +- Web New Deck modal renders an “Additional Themes” HTMX partial supporting add/remove, suggestion adoption, mode switching, limit enforcement, and accessible live messaging (gated by `ENABLE_CUSTOM_THEMES`). +- Supplemental theme telemetry now records commander/user/merged theme payloads, exposes `/status/theme_metrics` for diagnostics, and surfaces user theme weighting via structured `user_theme_applied` logs and the diagnostics dashboard panel. + - Environment variables surfaced in compose, `.env.example`, and docs: + - `SHOW_COMMANDERS` (default `1`): show the Commanders browser tile. + - `RANDOM_REROLL_THROTTLE_MS` (default `350`): client guard to prevent rapid rerolls. + - `RANDOM_STRUCTURED_LOGS` (default `0`): emit structured JSON logs for random builds. + - `RANDOM_TELEMETRY` (default `0`): enable lightweight timing/attempt counters for diagnostics. + - `RATE_LIMIT_ENABLED` (default `0`), `RATE_LIMIT_WINDOW_S` (`10`), `RATE_LIMIT_RANDOM` (`10`), `RATE_LIMIT_BUILD` (`10`), `RATE_LIMIT_SUGGEST` (`30`): optional server-side rate limiting for random endpoints. + +## Changed +- Run-config exports now surface `userThemes` and `themeCatalogVersion` metadata while retaining legacy fields; headless imports accept both aliases without changing hash-equivalent payloads when no user themes are present. + +## Fixed +- Additional Themes now falls back to `theme_list.json` when `theme_catalog.csv` is absent, restoring resolution, removal, and build application for user-supplied themes across web and headless flows. diff --git a/pyproject.toml b/pyproject.toml index a349abb..d534fb8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "mtg-deckbuilder" -version = "2.4.0" +version = "2.4.1" description = "A command-line tool for building and analyzing Magic: The Gathering decks" readme = "README.md" license = {file = "LICENSE"}