Files
César ValadezandClaude Sonnet 4.6 fcd53df552 feat: remove dynamicprompts dependency, add native WildcardManager
Replace dynamicprompts.WildcardManager with a native implementation in
src/wildcards.py that loads .txt, .yaml, and .json wildcard files from
one or more directories using fnmatch pattern matching. EvaluationContext
now types wildcard_manager as a WildcardProvider Protocol rather than the
concrete class.

Remove dynamicprompts from dependencies; add pyyaml>=6.0 and types-pyyaml
as its replacement. Add explicit_package_bases = true to mypy config to
resolve duplicate module path ambiguity from the root __init__.py.

Update README and CLAUDE to reflect the native parser architecture and
removal of the Jinja2 node. Remove completed plan documents. Ignore
user-specific yaml wildcard files via .gitignore.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 15:33:29 -06:00

18 lines
583 B
Python

import pytest
from pathlib import Path
import src.wildcards as wildcards_mod
from src.wildcards import WildcardManager
@pytest.fixture
def wildcards_path(tmp_path: Path) -> Path:
(tmp_path / "animals.txt").write_text("cat\ndog\nbird\n")
(tmp_path / "styles.yaml").write_text("painting:\n - oil painting\n - watercolor\n")
return tmp_path
@pytest.fixture(autouse=True)
def patch_wildcards(wildcards_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setattr(wildcards_mod, "get_wildcard_manager", lambda: WildcardManager(paths=[wildcards_path]))