chore: prepare release 4.3.1

This commit is contained in:
matt 2026-03-25 18:11:09 -07:00
parent 0ab2183277
commit 94765622ba
7 changed files with 76 additions and 10 deletions

View file

@ -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

View file

@ -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 / 4244).
- **Profile selection**: Three mana-base profiles are available — *Basics-heavy* (~60% basics, for 12 color or low-pip decks), *Balanced* (standard ratios, 23 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

View file

@ -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 12 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=<n>`. 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_

View file

@ -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

View file

@ -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

40
docs/releases/v4.3.1.md Normal file
View file

@ -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) — 12 color decks or low pip density
- *Balanced* — 23 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=<n>` — force a specific land count, bypassing curve calculation

View file

@ -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"}