Skip to content

Create parent directories for local memory persistence#2216

Open
onyx679 wants to merge 1 commit into
griptape-ai:mainfrom
onyx679:codex/create-memory-parent-dir
Open

Create parent directories for local memory persistence#2216
onyx679 wants to merge 1 commit into
griptape-ai:mainfrom
onyx679:codex/create-memory-parent-dir

Conversation

@onyx679

@onyx679 onyx679 commented Jun 28, 2026

Copy link
Copy Markdown

Summary

This updates LocalConversationMemoryDriver.store() to create the parent directory for persist_file before writing persisted conversation memory.

Previously, using a nested path such as memory/test_memory.json raised FileNotFoundError if the parent directory did not already exist.

Changes

  • Create persist_file.parent with parents=True, exist_ok=True before writing.
  • Add a unit test covering nested local conversation memory persistence paths.

Tests

  • D:\简历\griptape\.venv\Scripts\python.exe -m pytest tests/unit/drivers/memory/conversation/test_local_conversation_memory_driver.py -q
  • D:\简历\griptape\.venv\Scripts\python.exe -m pytest tests/unit/drivers/memory/conversation -q
  • D:\简历\griptape\.venv\Scripts\python.exe -m ruff check griptape/drivers/memory/conversation/local_conversation_memory_driver.py tests/unit/drivers/memory/conversation/test_local_conversation_memory_driver.py
  • git diff --check

@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@onyx679 onyx679 marked this pull request as ready for review June 28, 2026 17:55
Sign up for free to 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.

1 participant