Skip to content

feat: AsyncUseCase パターンを実装する (#42)#46

Merged
hideyukiMORI merged 1 commit into
mainfrom
feat/issue-42-async-use-case
May 19, 2026
Merged

feat: AsyncUseCase パターンを実装する (#42)#46
hideyukiMORI merged 1 commit into
mainfrom
feat/issue-42-async-use-case

Conversation

@hideyukiMORI
Copy link
Copy Markdown
Owner

Summary

  • src/nene2/use_case/ パッケージを新設し、UseCaseProtocol[I, O]AsyncUseCaseProtocol[I, O] を定義
  • Python 3.12 generic 構文 + @runtime_checkable で構造的サブタイピングを実現
  • src/example/note/async_use_case.py でデモ実装(asyncio.to_thread + asyncio.gather で並列 I/O)
  • docs/adr/0010-async-use-case.md に設計決定を記録

Test plan

  • uv run pytest — 144 passed, coverage 91%
  • uv run mypy src/ — clean
  • uv run ruff check src/ tests/ — clean
  • Protocol 準拠テスト 5 件(tests/nene2/use_case/test_protocols.py
  • 非同期 UseCase 統合テスト 4 件(tests/example/note/test_async_note_use_case.py

Closes #42

🤖 Generated with Claude Code

@hideyukiMORI hideyukiMORI merged commit af3e727 into main May 19, 2026
1 check failed
@hideyukiMORI hideyukiMORI deleted the feat/issue-42-async-use-case branch May 19, 2026 12:11
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.

feat: AsyncUseCase パターンを実装する

1 participant