Skip to content

feat(cli): add --fixture flag for catalog fixture mode - #235

Merged
ulises-jeremias merged 4 commits into
mainfrom
feat/issue-227-fixture-flag
Jul 22, 2026
Merged

feat(cli): add --fixture flag for catalog fixture mode#235
ulises-jeremias merged 4 commits into
mainfrom
feat/issue-227-fixture-flag

Conversation

@ulises-jeremias

Copy link
Copy Markdown
Member

Summary

  • Add --fixture [dir] CLI flag (CNA parity) that sets CPA_CATALOG_FIXTURE / optional CPA_FIXTURE_DIR
  • Resolve fixture root via env → package path → cwd; fail clearly when fixture mode cannot find the catalog
  • Bypass in-memory catalog cache when fixture mode is enabled

Test plan

  • uv run pytest packages/create-awesome-python-app/tests/test_cli.py packages/create-awesome-python-app/tests/test_catalog_fetch.py
  • create-awesome-python-app --fixture --list-templates from repo root
  • create-awesome-python-app --fixture /path/to/repo --list-templates

Closes#227

Made with Cursor

ulises-jeremiasand others added 4 commits July 22, 2026 01:29
Enable CPA_CATALOG_FIXTURE via --fixture [dir] (CNA parity) and resolve
CPA_FIXTURE_DIR before the in-memory catalog cache.
Closes#227
Co-authored-by: Cursor <cursoragent@cursor.com>
Format catalog helpers, fix pyright on the fixture generator, walk up
for fixture roots, and keep integration scaffolds out of fixture mode.
Co-authored-by: Cursor <cursoragent@cursor.com>
Clear fixture-related env via os.environ.pop in a shared autouse
conftest so monkeypatch teardown cannot restore values set by
apply_fixture_mode.
Co-authored-by: Cursor <cursoragent@cursor.com>
Pyright rejects `-> None` on autouse fixtures that yield.
Co-authored-by: Cursor <cursoragent@cursor.com>
@ulises-jeremias
ulises-jeremias merged commit 2bd780e into mainJul 22, 2026
13 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --fixture CLI flag for catalog fixture mode

1 participant

@ulises-jeremias