Skip to content

[DEPLOY] ver 1.2.5#17

Merged
goblurry merged 3 commits into
deployfrom
main
Nov 16, 2025
Merged

[DEPLOY] ver 1.2.5#17
goblurry merged 3 commits into
deployfrom
main

Conversation

@goblurry

@goblurry goblurry commented Nov 16, 2025

Copy link
Copy Markdown
Member

🎯 목적

source_published_at 날짜만 저장하도록 수정함. (timezone 문제 해결)

📝 주요 변경사항

위와 같음.

🔗 관련 이슈/PR

🔄 버전 검토

  • 배포 버전 변경 시 config.py 업데이트 필요

🧪 테스트

  • 로컬 테스트 완료(Swagger UI에서 API 동작 확인)

📋 체크리스트

  • API 스펙 변경사항 문서화 (Swagger 업데이트)
  • 프론트엔드에 필요한 환경 변수 안내
  • 데이터베이스 스키마 변경사항 공유 (schema.sql 업데이트)
  • API 응답 형식 변경 여부 확인
  • CodeRabbit 제안사항 검토 완료

📝 커밋 메시지 규칙
타입 설명
feat 새로운 기능 추가 (API, 서비스 로직 등)
fix 버그 수정 (예외 처리, 로직 오류 등)
refactor 리팩토링 (기능 변화 없이 구조 개선)
style 코드 스타일 수정 (공백, 들여쓰기 등)
docs 문서 수정 (README, Swagger, 주석 등)
test 테스트 코드 추가/수정
chore 설정/빌드 관련 변경 (requirements.txt, .gitignore 등)
perf 성능 개선 (쿼리 최적화 등)
ci CI/CD 관련 설정 변경 (GitHub Actions 등)
config 설정 파일 변경 (config.py 등)

예시: feat: 뉴스 칼럼 추천 API 추가

Summary by CodeRabbit

릴리스 노트

  • 버그 수정

    • 뉴스 게시 날짜 처리 안정성 개선 - 날짜 형식 파싱이 더욱 견고해졌으며, 형식이 맞지 않는 입력의 경우 안전하게 처리됩니다.
  • 작업

    • 애플리케이션 버전을 1.2.5로 업데이트했습니다.

@coderabbitai

coderabbitai Bot commented Nov 16, 2025

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

애플리케이션 버전을 1.2.5로 업데이트하고, 뉴스 저장소에서 source_published_at 필드 처리 로직을 개선했습니다. 날짜 추출 및 파싱 기능이 추가되었고, 에러 발생 시 폴백 처리 및 경고 로깅이 구현되었습니다.

Changes

Cohort / File(s) Summary
버전 업데이트
app/config.py
Settings 클래스의 app_version 상수를 "1.2.4"에서 "1.2.5"로 변경
뉴스 저장소 날짜 처리
app/services/news/news_db_repository.py
source_published_at 처리 로직 개선: ISO 형식 문자열에서 날짜 부분(YYYY-MM-DD) 추출, datetime 객체로 파싱하여 시간을 00:00:00으로 설정, 파싱 실패 시 None 설정 및 경고 로깅 추가

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • app/services/news/news_db_repository.py에서 날짜 파싱 로직의 정확성 확인 필요 (ISO 형식 처리, None 폴백 동작, 로깅 메시지 검증)
  • 기존 UPSERT 로직과의 호환성 확인 필요

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 배포 버전 1.2.5로의 변경을 명시하고 있으나, 실제 주요 변경사항인 source_published_at 날짜 처리 수정(timezone 문제 해결)을 반영하지 않고 있습니다.
Description check ✅ Passed PR 설명은 목적, 주요 변경사항, 관련 이슈, 버전 검토, 테스트 항목을 포함하고 있으나, 체크리스트 중 'CodeRabbit 제안사항 검토 완료' 항목이 미완료 상태입니다.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch main

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
app/services/news/news_db_repository.py (1)

47-56: datetime 객체 처리를 단순화할 수 있습니다.

현재 로직은 정상 작동하지만, Python의 내장 메서드를 활용하면 더 간결하게 작성할 수 있습니다.

다음과 같이 리팩토링할 수 있습니다:

                    else:
                        # datetime 객체인 경우 날짜만 추출
                        if isinstance(source_published_at, datetime):
-                            published_at_timestamp = datetime(
-                                source_published_at.year,
-                                source_published_at.month,
-                                source_published_at.day
-                            )
+                            published_at_timestamp = source_published_at.replace(
+                                hour=0, minute=0, second=0, microsecond=0
+                            )
                        else:
                            published_at_timestamp = None

또는:

from datetime import datetime, time

# ...
published_at_timestamp = datetime.combine(
    source_published_at.date(), 
    time.min
)
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f7aa6f1 and ad4cb07.

📒 Files selected for processing (2)
  • app/config.py (1 hunks)
  • app/services/news/news_db_repository.py (1 hunks)
🧰 Additional context used
🪛 Ruff (0.14.4)
app/services/news/news_db_repository.py

57-57: Do not catch blind exception: Exception

(BLE001)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test-and-build
🔇 Additional comments (3)
app/config.py (1)

44-44: 버전 업데이트가 올바르게 적용되었습니다.

PR 목표와 일치하는 버전 1.2.5로의 업데이트가 정확하게 반영되었습니다.

app/services/news/news_db_repository.py (2)

37-46: 날짜 추출 로직이 올바르게 구현되었습니다.

ISO 형식 문자열에서 날짜 부분만 추출하여 타임존 문제를 해결하는 로직이 정확합니다. split('T')[0]를 사용하면 전체 datetime 문자열과 날짜만 있는 문자열 모두 올바르게 처리됩니다.


57-59: 예외 처리가 적절합니다.

정적 분석 도구가 광범위한 예외 처리를 지적하고 있지만, 이 경우는 정당합니다. 외부 데이터 파싱 시 ValueError, AttributeError 등 다양한 예외가 발생할 수 있으며, 경고 로그와 함께 None으로 폴백하는 것이 안전한 방어적 프로그래밍입니다.

@goblurry
goblurry merged commit 98b9f5a into deploy Nov 16, 2025
2 checks passed
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