Merged
Conversation
- TrendOrchestrator: TagNormalizer→FrequencyAnalyzer→TfidfAnalyzer→TrendRanker →TopPostsSummaryGenerator+CollectionSummaryGenerator→TrendSnapshotRepository - compute_period(): daily/weekly/monthly 직전 기간 자동 계산 (weekly=월~월) - run_trend_batch.py: --unit/--period-start/--force CLI - run_trend_scheduler.py: APScheduler 3 cron jobs (daily 00:05 / weekly 월 00:10 / monthly 1일 00:15 KST) - TrendDataLoader: prev_contents 4번째 병렬 쿼리 추가 (FrequencyAnalyzer 입력용) - find_by_published_range: source_name(JOIN) + thumbnail_url 포함으로 확장 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- CLAUDE.md(root): 현재 상태 + 핵심 책임 + 자주 하는 작업에 트렌드 배치 추가 - scripts/CLAUDE.md: run_trend_batch.py, run_trend_scheduler.py 사용법 추가 - app/services/CLAUDE.md: trend/ 서비스 목록 전체 추가 - tests/CLAUDE.md: 트렌드 관련 테스트 파일 목록 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- app/services/trend/CLAUDE.md: 신규 생성 — 컴포넌트 구성, 전체 흐름, 데이터 계약 문서화 - app/core/CLAUDE.md: trend_top_posts.py, trend_collection.py 프롬프트 추가 - app/repositories/CLAUDE.md: TrendSnapshotRepository 추가 - README.md: 트렌드 배치 파이프라인 섹션 + 스크립트 목록 + 실행 명령 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TrendOrchestrator: TagNormalizer → FrequencyAnalyzer → TfidfAnalyzer → TrendRanker → TopPostsSummaryGenerator + CollectionSummaryGenerator → TrendSnapshotRepository 전 흐름 오케스트레이션compute_period(): daily/weekly/monthly 직전 기간 자동 계산 (weekly = 월~월 정렬)run_trend_batch.py: CLI —--unit daily/weekly/monthly,--period-start,--forcerun_trend_scheduler.py: APScheduler BlockingScheduler — daily 00:05 / weekly 월 00:10 / monthly 1일 00:15 KSTTrendDataLoader:prev_contents4번째 병렬 쿼리 추가 (FrequencyAnalyzer 이전 기간 태그 입력용)find_by_published_range:source_name(LEFT JOIN) +thumbnail_url포함으로 확장 (TopContent조립용)app/services/trend/CLAUDE.md신규 생성 + README/CLAUDE.md 업데이트주요 설계 결정
force=False이고 동일 (unit, period_start) 스냅샷 존재 시 재생성 없이 즉시 반환AIUpstreamError,AITimeoutError) 시 해당 요약 필드만null, 스냅샷 저장은 계속CollectionSummaryGenerator는unit="daily"자동 skip (내부 None 반환)SummaryRepository인스턴스를TrendDataLoader와TopPostsSummaryGenerator공유 → DynamoDB 연결 재사용Test plan
pytest -q tests/test_trend_orchestrator.py— 정상 흐름, skip/force, LLM 실패 격리, date_label, compute_period 검증pytest -q tests/test_trend_data_loader.py— prev_contents 포함 확인pytest -q— 전체 회귀 (421 tests passed)ruff check . && black --check .— lint/format 통과🤖 Generated with Claude Code