diff --git a/.gitignore b/.gitignore index 027eddd..367d19f 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,10 @@ test.py !requirements.txt __pycache__/ -csv_files/ +# Keep main CSV datasets out of Git, but allow the tiny deterministic fixtures used by CI. +csv_files/* +!csv_files/testdata/ +!csv_files/testdata/**/* dist/ logs/ !logs/ @@ -17,7 +20,6 @@ logs/* logs/perf/* !logs/perf/theme_preview_warm_baseline.json deck_files/ -csv_files/ config/themes/catalog/ !config/card_lists/*.json !config/themes/*.json diff --git a/CHANGELOG.md b/CHANGELOG.md index b7a59e9..ffeb7bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ This format follows Keep a Changelog principles and aims for Semantic Versioning - Link PRs/issues inline when helpful, e.g., (#123) or [#123]. Reference-style links at the bottom are encouraged for readability. ## [Unreleased] +### Added +- Included the tiny `csv_files/testdata` fixture set so CI fast determinism tests have consistent sample data. + ### Changed - Theme catalog schema now accepts optional `id` values on entries so refreshed catalogs validate cleanly. - CI installs `httpx` with the rest of the web stack and runs pytest via `python -m pytest` so FastAPI tests resolve the local `code` package correctly. diff --git a/RELEASE_NOTES_TEMPLATE.md b/RELEASE_NOTES_TEMPLATE.md index 5c2e1d6..618539b 100644 --- a/RELEASE_NOTES_TEMPLATE.md +++ b/RELEASE_NOTES_TEMPLATE.md @@ -4,6 +4,7 @@ - Hardened theme catalog schema to accept optional IDs and refreshed the preview performance baseline to keep CI checks green. - CI updates install the missing `httpx` dependency and run pytest through `python -m` to ensure the web stack tests import the local package correctly. - Fast-path catalog validation now tolerates empty synergy lists while still flagging missing fields or non-string entries. +- Committed deterministic CSV fixtures under `csv_files/testdata` so CI random-mode checks have a stable dataset. - Delivered multi-theme random builds with deterministic cascade, strict match support, and polished HTMX/UI flows. - Added opt-in telemetry counters, reroll throttling safeguards, and structured diagnostics exports. - Expanded tooling, documentation, and QA coverage for theme governance, performance profiling, and seed history management. @@ -33,6 +34,7 @@ - Theme catalog schema now accepts optional IDs and the preview performance warm baseline was regenerated to restore the regression gate. - GitHub Actions now includes `httpx` in the default dependency install and executes pytest via `python -m` so FastAPI TestClient suites run without import errors. - Fast path validator treats empty synergy arrays as acceptable and only warns on missing or malformed data, reducing noise during automated catalog generation. +- Tracked the tiny `csv_files/testdata` dataset in Git to guarantee fast determinism tests run against a consistent fixture set. ## Detailed changes ### Added diff --git a/csv_files/testdata/README.md b/csv_files/testdata/README.md new file mode 100644 index 0000000..04ac381 --- /dev/null +++ b/csv_files/testdata/README.md @@ -0,0 +1,10 @@ +Frozen test dataset for deterministic tests. + +Use by setting environment variable CSV_FILES_DIR=csv_files/testdata (or absolute path in Docker). + +Expected minimal files: +- cards.csv (flattened all-cards dataset for validation endpoints) +- commander_cards.csv +- *_cards.csv per color identity needed by tests (e.g., colorless_cards.csv) + +Keep this tiny and representative; avoid adding large data. diff --git a/csv_files/testdata/cards.csv b/csv_files/testdata/cards.csv new file mode 100644 index 0000000..dd8513a --- /dev/null +++ b/csv_files/testdata/cards.csv @@ -0,0 +1,6 @@ +name,faceName,edhrecRank,colorIdentity,colors,manaCost,manaValue,type,creatureTypes,text,power,toughness,keywords,themeTags,layout,side +Shock,,,,R,{R},1,Instant,,Deal 2 damage to any target.,,,,[Burn],normal, +Plains,,,,W,,0,Land,,{T}: Add {W}.,,,,[Land],normal,name,faceName,edhrecRank,colorIdentity,colors,manaCost,manaValue,type,creatureTypes,text,power,toughness,keywords,themeTags,layout,side +Sol Ring,,1,Colorless,,{1},{1},Artifact,,{T}: Add {C}{C}.,,,Mana,Utility,normal, +Llanowar Elves,,5000,G,G,{G},{1},Creature,Elf Druid,{T}: Add {G}.,1,1,Mana,Tribal;Ramp,normal, +Island,,9999,U,U,,,Land,,{T}: Add {U}.,,,Land,,normal, diff --git a/csv_files/testdata/colors/black_cards.csv b/csv_files/testdata/colors/black_cards.csv new file mode 100644 index 0000000..38efe28 --- /dev/null +++ b/csv_files/testdata/colors/black_cards.csv @@ -0,0 +1,2 @@ +name,type_line,tags +Swampshade Test,Creature,B diff --git a/csv_files/testdata/colors/colorless_cards.csv b/csv_files/testdata/colors/colorless_cards.csv new file mode 100644 index 0000000..6778373 --- /dev/null +++ b/csv_files/testdata/colors/colorless_cards.csv @@ -0,0 +1,2 @@ +name,type_line,tags +MyrTest,Artifact Creature,Colorless diff --git a/csv_files/testdata/colors/red_cards.csv b/csv_files/testdata/colors/red_cards.csv new file mode 100644 index 0000000..96ac88f --- /dev/null +++ b/csv_files/testdata/colors/red_cards.csv @@ -0,0 +1,2 @@ +name,type_line,tags +Mountainling Test,Creature,R diff --git a/csv_files/testdata/colors/white_cards.csv b/csv_files/testdata/colors/white_cards.csv new file mode 100644 index 0000000..b10407a --- /dev/null +++ b/csv_files/testdata/colors/white_cards.csv @@ -0,0 +1,2 @@ +name,type_line,tags +Plainscycler Test,Creature,W diff --git a/csv_files/testdata/commander_cards.csv b/csv_files/testdata/commander_cards.csv new file mode 100644 index 0000000..d5da2a5 --- /dev/null +++ b/csv_files/testdata/commander_cards.csv @@ -0,0 +1,3 @@ +name,faceName,edhrecRank,colorIdentity,colors,manaCost,manaValue,type,creatureTypes,text,power,toughness,keywords,themeTags,layout,side +Krenko, Mob Boss,,1200,R,R,{2}{R}{R},4,Legendary Creature,['Goblin'],Tap: Create X 1/1 red Goblin tokens.,3,3,,['Goblin Kindred'],normal, +Isamaru, Hound of Konda,,2500,W,W,{W},1,Legendary Creature,['Hound'],Legendary creature.,2,2,,['Dog Kindred'],normal,