11 Commits
Author SHA1 Message Date
Claude 529f97e87e Add module-level docstrings to all modules (closes #18)
Added one-line module docstrings to config.py, file_utils.py,
load_description_node.py, and random_line_from_text_node.py to
improve navigability and IDE support.

https://claude.ai/code/session_01JBWyFr5shvPXUPmZkX3Nhg
2026-03-23 18:18:49 +00:00
Claude 18a974d7d3 Remove redundant _abs_path() wrapper in LoadDescriptionNode (closes #16)
_abs_path() was a one-liner that only delegated to normalize_description_path().
Removed the wrapper and replaced all call sites with direct calls to
normalize_description_path(). Removed the now-redundant TestAbsPath test class
(covered by TestNormalizeDescriptionPath in test_file_utils.py).

https://claude.ai/code/session_01JBWyFr5shvPXUPmZkX3Nhg
2026-03-23 18:16:37 +00:00
Claude 4394861df4 Move list_all_description_files() and _ensure_example_exists() to file_utils.py (closes #15)
Both functions are file I/O operations and belong in file_utils.py alongside
the other file utilities. load_description_node.py now imports them from there.
Added tests for both functions in test_file_utils.py.

https://claude.ai/code/session_01JBWyFr5shvPXUPmZkX3Nhg
2026-03-23 18:15:44 +00:00
Claude 699984be5f docs(#10): Type Hints und Docstrings für öffentliche Node-Methoden ergänzen
- load_description_node.py: load_description() mit Signatur
  (file_path: str, **kwargs) -> tuple[str, str] und Docstring
- feroc_node.py: get_random_lines() mit Signatur
  (seed: int, **kwargs) -> tuple[str] und Docstring
- Nur geänderte Methoden annotiert (kein Over-Engineering)

Closes #10
2026-03-23 13:38:19 +00:00
Claude 0b5188a4a0 refactor(#5): Doppelte Fallback-Logik in _resolve_file_path extrahieren
- Neue statische Methode _resolve_file_path() in LoadDescriptionNode:
  gibt file_path zurück oder fällt auf ersten verfügbaren Eintrag zurück
- IS_CHANGED() und load_description() delegieren an _resolve_file_path()
  statt die Fallback-Logik zu duplizieren
- 4 neue Tests für alle Fallback-Szenarien (leer, None, "undefined", gesetzt)

Closes #5
2026-03-23 13:35:50 +00:00
Claude b6cc844ce3 refactor(#7): Gemeinsame Datei-Utilities in file_utils.py extrahieren
- file_utils.py angelegt mit: read_text_file(), read_random_line(),
  normalize_description_path()
- load_description_node.py: _abs_path() delegiert an normalize_description_path(),
  load_description() nutzt read_text_file()
- feroc_node.py: get_random_lines() nutzt read_random_line() mit lokalem
  random.Random(seed) statt globalem random.seed()
- tests/test_file_utils.py: 12 Tests für alle file_utils-Funktionen
- tests/test_load_description_node.py: monkeypatch auf file_utils.DESCRIPTION_PATH
  ergänzt für korrekte Test-Isolation

Closes #7
2026-03-23 13:34:58 +00:00
Claude da719f2b93 refactor(#8): Hardcoded Konstanten in config.py zentralisieren
- config.py angelegt mit: DESCRIPTION_PATH, TEXT_FILE_EXTENSION,
  FALLBACK_FILE, MAX_SEED, MAX_FILE_INPUTS
- load_description_node.py: alle Konstanten aus config importiert,
  hardcoded Strings ersetzt
- feroc_node.py: MAX_SEED und MAX_FILE_INPUTS aus config importiert,
  INPUT_TYPES generiert optional-Felder dynamisch über MAX_FILE_INPUTS
- Imports nutzen try/except-Fallback für Test-Kontext ohne Paket

Closes #8
2026-03-23 13:33:09 +00:00
Claude e13c7dbfc4 fix(#3): Doppelte Methodendefinitionen in LoadDescriptionNode entfernen
- Zweite (schwächere) Definition von _abs_path() und IS_CHANGED() entfernt;
  die erste, korrekte Version (mit .txt-Handling und Backslash-Normalisierung) bleibt
- __init__.py mit try/except für relative Imports gesichert (pytest-Kompatibilität)
- pytest-Setup eingerichtet: pytest.ini, conftest.py, tests/test_load_description_node.py
- .gitignore um __pycache__ und .pytest_cache erweitert

Closes #3
2026-03-23 13:31:16 +00:00
Mathias ad343f332e initial 2025-08-08 23:49:48 +02:00
Mathias a62f536f29 feat: Enhance LoadDescriptionNode with subdirectory and file selection 2025-08-08 21:43:11 +02:00
Mathias fd618f201f initial 2025-08-08 21:34:01 +02:00