From 94765622bab7c703adc11eba027c6879194e3036 Mon Sep 17 00:00:00 2001 From: matt Date: Wed, 25 Mar 2026 18:11:09 -0700 Subject: [PATCH] chore: prepare release 4.3.1 --- .env.example | 2 +- CHANGELOG.md | 19 ++++++++++++++--- RELEASE_NOTES_TEMPLATE.md | 19 ++++++++++++++--- docker-compose.yml | 2 +- dockerhub-docker-compose.yml | 2 +- docs/releases/v4.3.1.md | 40 ++++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- 7 files changed, 76 insertions(+), 10 deletions(-) create mode 100644 docs/releases/v4.3.1.md diff --git a/.env.example b/.env.example index 573c650..aa6b110 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.2.1 # Matches dockerhub compose. +APP_VERSION=v4.3.1 # Matches dockerhub compose. ############################ # Theming diff --git a/CHANGELOG.md b/CHANGELOG.md index a4eb0d8..7b4fd15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,19 @@ This format follows Keep a Changelog principles and aims for Semantic Versioning ## [Unreleased] ### Added +_No unreleased changes yet_ + +### Changed +_No unreleased changes yet_ + +### Fixed +_No unreleased changes yet_ + +### Removed +_No unreleased changes yet_ + +## [4.3.1] - 2026-03-25 +### Added - **Smart Land Bases**: Land count and basic-to-dual ratio are now adjusted automatically based on the commander's speed and color-pip intensity. Controlled by `ENABLE_SMART_LANDS=1` (default on in Docker). - **Speed detection**: Commander CMC determines a speed category applied as an offset to the user's configured ideal land count. Fast decks (CMC < 3) get −2 lands, mid decks stay at ±0, slow decks (CMC > 4) get +2 to +4 lands scaling with color count (e.g. a user-set ideal of 40 yields 38 / 40 / 42–44). - **Profile selection**: Three mana-base profiles are available — *Basics-heavy* (~60% basics, for 1–2 color or low-pip decks), *Balanced* (standard ratios, 2–3 colors with moderate pip density), and *Fixing-heavy* (minimal basics, more duals/fetches, for 3+ color decks or pools with ≥15 double-pip or ≥3 triple-or-more-pip cards). @@ -20,13 +33,13 @@ This format follows Keep a Changelog principles and aims for Semantic Versioning - A **Smart Lands** notice in the Land Summary section explains the chosen profile and targets in plain English. ### Changed -_No unreleased changes yet_ +_No changes_ ### Fixed -_No unreleased changes yet_ +_No changes_ ### Removed -_No unreleased changes yet_ +_No changes_ ## [4.2.1] - 2026-03-23 ### Fixed diff --git a/RELEASE_NOTES_TEMPLATE.md b/RELEASE_NOTES_TEMPLATE.md index f99aa11..65d62ef 100644 --- a/RELEASE_NOTES_TEMPLATE.md +++ b/RELEASE_NOTES_TEMPLATE.md @@ -2,6 +2,19 @@ ## [Unreleased] ### Added +_No unreleased changes yet_ + +### Changed +_No unreleased changes yet_ + +### Fixed +_No unreleased changes yet_ + +### Removed +_No unreleased changes yet_ + +## [4.3.1] - 2026-03-25 +### Added - **Smart Land Bases**: Land count and basic-to-dual ratio are now adjusted automatically based on the commander's speed and color-pip intensity. Controlled by `ENABLE_SMART_LANDS=1` (default on in Docker). - **Speed detection**: Commander CMC determines a speed category applied as an offset to the user's configured ideal land count. Fast (CMC < 3) = −2 lands, mid = ±0, slow (CMC > 4) = +2 to +4 scaling with color count. - **Profile selection**: Basics-heavy (~60% basics) for 1–2 color / low-pip decks; Balanced for moderate pip density; Fixing-heavy (minimal basics, more duals/fetches) for 3+ color or high-pip pools (≥15 double-pip or ≥3 triple-or-more-pip cards). @@ -12,10 +25,10 @@ - Override with `LAND_PROFILE=basics|mid|fixing` or `LAND_COUNT=`. A **Smart Lands** notice in the Land Summary explains the chosen profile. ### Changed -_No unreleased changes yet_ +_No changes_ ### Fixed -_No unreleased changes yet_ +_No changes_ ### Removed -_No unreleased changes yet_ +_No changes_ diff --git a/docker-compose.yml b/docker-compose.yml index ee8e461..5c34cdf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -143,7 +143,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.2.1" # Displayed version label (set per release/tag) + APP_VERSION: "v4.3.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 fb42048..2a48075 100644 --- a/dockerhub-docker-compose.yml +++ b/dockerhub-docker-compose.yml @@ -145,7 +145,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.2.1" # Displayed version label (set per release/tag) + APP_VERSION: "v4.3.1" # Displayed version label (set per release/tag) # ------------------------------------------------------------------ # Misc / Land Selection (Step 7) Environment Tuning diff --git a/docs/releases/v4.3.1.md b/docs/releases/v4.3.1.md new file mode 100644 index 0000000..5117c9c --- /dev/null +++ b/docs/releases/v4.3.1.md @@ -0,0 +1,40 @@ +# MTG Python Deckbuilder v4.3.1 + +## Summary +Adds Smart Land Bases — automatic land count and mana-base profile selection driven by the commander's CMC and color-pip density, with no configuration required. + +## Added + +### Smart Land Bases +When `ENABLE_SMART_LANDS=1` (default in Docker), the builder analyzes the commander profile at build time and automatically selects a land count, mana-base profile, and ETB tapped tolerance suited to the deck's speed and color complexity. + +**Speed detection** +Commander CMC is used to classify the deck as fast (< 3.0), mid, or slow (> 4.0). The user's configured ideal land count is offset accordingly: +- Fast: −2 lands +- Mid: ±0 +- Slow: +2 to +4, scaling with color count + +**Profile selection** +Three mana-base profiles determine the ratio of basics to non-basics and the ETB tapped tolerance: +- *Basics-heavy* (~60% basics) — 1–2 color decks or low pip density +- *Balanced* — 2–3 colors with moderate pip density (standard) +- *Fixing-heavy* — 3+ colors or high pip density (≥15 double-pip or ≥3 triple-or-more-pip cards); minimizes basics in favor of duals and fetches + +**ETB tapped tolerance** +Automatically tightened for fast decks (fewer taplands allowed) and loosened for slow decks, so the land selection step reinforces the speed profile. + +**Budget override** +When Budget Mode is active with a low cap and 3+ colors, the profile is automatically forced to basics-heavy to avoid recommending expensive fetch/shock lands the deck cannot afford. + +**Slot earmarking** +After the land target is set, non-land ideal counts (creatures, ramp, removal, wipes, card draw, protection) are scaled proportionally to fit within the remaining slots. This prevents the spell-fill phases from consuming slots reserved for lands. + +**Backfill** +A final land step (Step 9) pads the deck with basics if any land phase fell short, guaranteeing the deck reaches the configured land target. A swap mechanism handles the 100-card safety clamp so backfill basics are never silently trimmed. + +**Smart Lands notice** +The Land Summary section in the build output explains the chosen profile, land target, and reasoning in plain English. + +**Overrides** +- `LAND_PROFILE=basics|mid|fixing` — force a specific profile, bypassing auto-detection +- `LAND_COUNT=` — force a specific land count, bypassing curve calculation diff --git a/pyproject.toml b/pyproject.toml index 8f80e80..5874dea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "mtg-deckbuilder" -version = "4.2.1" +version = "4.3.1" description = "A command-line tool for building and analyzing Magic: The Gathering decks" readme = "README.md" license = {file = "LICENSE"}