Merged
Conversation
…m) fallback 로직 추가, naver 장소정보불러올때 주소를 토대로 위치경도 로직 추가 #12
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Walkthrough지오코딩 기능을 구현하는 새로운 API 엔드포인트, 서비스 계층, 데이터 모델을 추가했습니다. Kakao 및 Nominatim 제공자를 지원하며, HTTP 요청 유틸리티와 설정을 통합했고 Naver 지도 스크래퍼에 폴백 지오코딩을 추가했습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant FastAPI as FastAPI App
participant Auth as verify_api_key
participant Service as geocoding_service
participant Kakao as Kakao API
participant Nominatim as Nominatim API
Client->>FastAPI: POST /api/geocode<br/>{address, api_key}
FastAPI->>Auth: verify_api_key(api_key)
Auth-->>FastAPI: ✓ api_key valid
FastAPI->>Service: geocode_with_kakao(address)
Service->>Kakao: GET /v2/local/search/address
alt Kakao Success
Kakao-->>Service: {documents: [...]}
Service-->>FastAPI: GeocodingResult(lat, lon, "kakao")
else Kakao Fail
Kakao-->>Service: empty or error
Service->>Service: raise CustomError
Service->>FastAPI: CustomError
end
FastAPI-->>Client: GeocodingResponse{address, latitude,<br/>longitude, provider}
sequenceDiagram
participant Service as geocoding_service
participant Kakao as Kakao API
participant Nominatim as Nominatim API
Service->>Kakao: geocode_with_kakao(address)
alt Kakao Success
Kakao-->>Service: GeocodingResult(lat, lon, "kakao")
Service-->>Service: return result
else Kakao Fail
Kakao-->>Service: CustomError
Service->>Nominatim: geocode_with_nominatim(address)
alt Nominatim Success
Nominatim-->>Service: GeocodingResult(lat, lon, "nominatim")
Service-->>Service: return result
else Nominatim Fail
Nominatim-->>Service: CustomError
Service-->>Service: return None
end
end
sequenceDiagram
participant Scraper as naver_map_scraper
participant Service as geocoding_service
participant GeoAPI as Kakao/Nominatim API
Scraper->>Scraper: Extract info from page
Scraper->>Scraper: Check lat/lon fields
alt lat or lon is None
Scraper->>Service: geocode_with_fallback(address)
Service->>GeoAPI: Call Kakao (fallback to Nominatim)
GeoAPI-->>Service: GeocodingResult or None
Service-->>Scraper: GeocodingResult | None
Scraper->>Scraper: Update lat/lon if successful
else lat and lon exist
Scraper->>Scraper: Use existing coordinates
end
Scraper->>Scraper: Create NaverPlaceInfo with coordinates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Comment |
Contributor
Author
|
@coderabbitai summary |
✅ Actions performedSummary regeneration triggered. |
|
✅ 변경사항이 자동으로 deploy 브랜치에 적용되었습니다. PR을 수동으로 닫아주세요. |
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 by CodeRabbit
새로운 기능
업데이트
✏️ Tip: You can customize this high-level summary in your review settings.