Skip to content

Refactor/#329 버스정류장 데이터 업데이트 및 관련 모델링 수정#338

Merged
isakatty merged 2 commits intodevfrom
refactor/#329
Mar 7, 2026
Merged

Refactor/#329 버스정류장 데이터 업데이트 및 관련 모델링 수정#338
isakatty merged 2 commits intodevfrom
refactor/#329

Conversation

@isakatty
Copy link
Contributor

@isakatty isakatty commented Aug 3, 2025

작업내용

FileManager, Superbase 넘어가기전 버스정류장 정보 업데이트
종점의 경우 빈 string으로 처리하기로 한 것에 따라 모델링 수정

리뷰요청

관련 이슈

close #329

Summary by CodeRabbit

  • 버그 수정

    • 버스 정류장 정보에서 다음 정류장(nxtStn) 값이 없을 경우를 올바르게 처리하도록 개선되었습니다.
  • 기타

    • 정류장 목록 데이터를 불러올 때 사용하는 파일명이 변경되었습니다.

@isakatty isakatty requested review from MUKER-WON and gnksbm August 3, 2025 14:35
@isakatty isakatty self-assigned this Aug 3, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 3, 2025

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • Projects/App/Resources/bus_station_list.json
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: feaa4bf6-7804-48dd-901f-35d4a16efc3a

📥 Commits

Reviewing files that changed from the base of the PR and between 11a0542 and 85cc55b.

📒 Files selected for processing (1)
  • Projects/App/Resources/bus_station_list.json

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

BusStopInfo 구조체의 nxtStn 속성이 비옵셔널에서 옵셔널(String?)로 변경되었습니다. 또한, 역방향 매핑 시 nil 병합 연산자를 사용하여 빈 문자열로 대체합니다. DefaultStationListRepository에서는 불러오는 JSON 파일명이 "total_stationList.json"에서 "bus_station_list.json"으로 변경되었습니다.

Changes

Cohort / File(s) Change Summary
DTO 구조체 및 매핑 로직 변경
Projects/Data/Sources/DTO/BusStopListDTO.swift
BusStopInfonxtStn 타입이 String에서 String?로 변경, 매핑 시 nil 병합 연산자(?? "") 적용
정류장 데이터 파일명 변경
Projects/Data/Sources/Repository/DefaultStationListRepository.swift
정류장 리스트 JSON 파일명 "total_stationList.json""bus_station_list.json"으로 변경

Sequence Diagram(s)

sequenceDiagram
    participant Repository as DefaultStationListRepository
    participant FileSystem as File System
    participant DTO as BusStopListDTO

    Repository->>FileSystem: Load "bus_station_list.json"
    FileSystem-->>Repository: Return JSON data
    Repository->>DTO: Parse JSON to BusStopInfo (nxtStn: String?)
    DTO-->>Repository: Return domain object (direction: nxtStn ?? "")
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Assessment against linked issues

Objective Addressed Explanation
로컬로 가지고 있던 버스정류장 데이터 업데이트 (#329)

Assessment against linked issues: Out-of-scope changes

(해당 변경사항에서 범위 밖의 변경사항은 발견되지 않았습니다.)

Poem

버스 정류장 데이터, 새 이름으로 변신!
nxtStn도 살짝 변해, 빈 문자열이든 nil이든 안심!
토끼는 귀를 쫑긋 세워,
새 파일을 찾아 뛰어가네—
2025년에도, 데이터는 신선하게! 🐇🚌✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/#329

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

Copy link

@coderabbitai coderabbitai bot left a comment

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)
Projects/Data/Sources/DTO/BusStopListDTO.swift (1)

68-68: Description 구조체와의 타입 불일치

Description 구조체의 nxtStn은 여전히 String 타입으로 정의되어 있지만, BusStopInfonxtStnString?로 변경되었습니다. 데이터 구조의 일관성을 위해 Description 구조체도 동일하게 수정하는 것을 고려해 주세요.

-    let stopNo, xcode, nxtStn: String
+    let stopNo, xcode: String
+    let nxtStn: String?
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1f08e87 and 11a0542.

📒 Files selected for processing (2)
  • Projects/Data/Sources/DTO/BusStopListDTO.swift (2 hunks)
  • Projects/Data/Sources/Repository/DefaultStationListRepository.swift (1 hunks)
⏰ 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: build_test
🔇 Additional comments (4)
Projects/Data/Sources/Repository/DefaultStationListRepository.swift (1)

115-115: JSON 파일 존재 확인 완료, 구조 호환성 검증 필요

Projects/App/Resources/bus_station_list.json이 번들에 실제로 포함되어 있습니다.
– 다음 스크립트로 JSON 최상위 키와 예시 레코드를 조회하여 BusStopListDTO 필드와 매핑이 올바른지 확인해 주세요:

# 최상위 키 확인
jq 'keys' Projects/App/Resources/bus_station_list.json
# 첫 번째 항목 샘플 확인
jq '.busStops[0]' Projects/App/Resources/bus_station_list.json

BusStopListDTO의 프로퍼티(예: stationName, nxtStn 등)와 JSON 필드 이름 및 타입이 일치하는지 검증 바랍니다.

Projects/Data/Sources/DTO/BusStopListDTO.swift (3)

34-34: nil 병합 연산자 사용 승인

터미널 정류장을 빈 문자열로 처리하기 위한 nil 병합 연산자(??) 사용이 적절합니다. 이는 하위 호환성을 유지하면서 새로운 데이터 구조를 지원할 수 있게 해줍니다.


45-45: nxtStn 옵셔널 타입 변경 승인

터미널 정류장 데이터 처리를 위한 nxtStn 속성의 옵셔널 타입 변경이 적절합니다. 이는 PR 목적에 부합하는 변경사항입니다.


43-60: nxtStn 옵셔널 변경, 영향 없음 확인 완료
검증 결과, 모든 nxtStn 사용처가 nil 병합 연산자(??)로 기본값을 지정하거나 compactMap으로 필터링하고 있어 옵셔널 타입 변경으로 인한 컴파일 에러나 런타임 이슈가 없습니다. 추가 수정은 필요하지 않습니다.

예시 사용처

  • Projects/Data/Sources/DTO/BusStopListDTO.swift:
    direction: $0.nxtStn ?? ""
  • Projects/Data/Sources/DTO/BusStopArrivalInfoDTO.swift:
    let nextStations = msgBody.itemList?.compactMap { $0.nxtStn }
    nextStation: item.nxtStn ?? "정거장 정보 없음"

struct BusStopInfo: Codable {
let stopNm, ycode, stopNo, xcode, nxtStn: String
let stopNm, ycode, stopNo, xcode: String
let nxtStn: String?
Copy link
Contributor

Choose a reason for hiding this comment

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

nxtStn이 nil이지만 유효한 데이터인 상황은 종점인 경우일까요?
이 형태로 Feature에 전파되었을 때 문제가 되지 않는지 확인 부탁드립니다!

@isakatty isakatty merged commit a2a7a68 into dev Mar 7, 2026
2 checks passed
isakatty added a commit that referenced this pull request Mar 7, 2026
* Fix/#320 네트워크 통신 로직수정 및 의존성 수정 (#321)

* [Fix] 네트워크 요청 Task dispose 시점에 취소되도록 수정

* [Fix] NetworkError 에러 케이스 추가 및 핸들링

* [Setting] firebase 의존성 수정, GoogleUtilities 의존성 추가

* Feat/#311 앱스토어의 앱 버전과 기존 앱의 버전을 추적하여 강제 업데이트 기능 (#313)

* [Add] #311 App store에 등록된 app id 추가

* [Add] #311 앱스토어에 등록된 앱의 최신 버전을 가져오는 함수

* [Add] #311 앱스토어에 연결하는 합수

* [Feat] #311 앱스토어 버전과 프로젝트 버전 비교해서 업데이트 alert 주는 함수

* [Chore] #311 completion block -> async await으로 수정 및 관련 코드 수정

* [Remove] #311 legacy 주석 삭제

* [Chore] #311 변수명 변경 및 린트 오류 수정, 사용하지 않는 변수 삭제

* [Chore] Single 형태로 변경

- 한 번 구독되고 값이 방출되면 stream이 마무리되는 single 선택
- error 케이스 생성
- private init() 을 통해 객체 생성 방지

* [Feat] AppStore에 올라간 정보를 받는 Endpoint 정의

- 린트에 맞춰 수정
- 싱글톤 형태로 변경

* [Add] #311 AppInfoResponse, DTO 추가

* [Add] #311 AppStoreRepository 생성

* [Remove] #311 레거시 코드 삭제

* [Refactor] #311 Endpoint Scheme 형태 변경 및 앱스토어 링크를 Endpoint 추가

* [Add] #311 네트워크 통신 Single 반환 형태 추가

* [Add] #311 itunes search api DTO 및 Response 모델 추가

* [Refactor] #311 사용자 앱 버전 반환 형태 변경

* [Fix] #311 Lint 형태 맞춰 수정

* [Add] #311 버전 확인을 위한 Repository 추가

* [Add] #311 Version 확인을 위한 UseCase 추가

* [Add] #311 DIContainer에 UseCase 의존성 추가

* [Refcator] #311 구조에 맞춰 버전 확인 적용

* [Refactor] #311 dev에 맞춰 Network 수정

* [Refactor] #311 오탈자 수정

* [Add] #311 최소버전에 대한 Endpoint 및 DTO 모델

* [Refactor] #311 변경된 Endpoint에 맞춰 수정

* [Add] #311 plist 수정

* [Refactor] #311 버전관리 의존성 주입 주석처리

* 추후 변경 예정

* [Refactor] #311 모델 리턴 타입 변경, Comparable 채택

- 강제 업데이트를 위한 정보를 담은 모델 생성
- major, minor, patch 버전 비교를 위한 Comparable 프로토콜 채택
- DTO -> Response 변환 과정 중 리턴 형태 수정

* [Refactor] #311 버전 관련 데이터 소스들을 관리하는 Repository 수정

* [Add] #311 버전을 비교하는 Service 객체 생성

- 추후 앱스토어 버전을 비교하는 형태 추가 예정

* [Refactor] #311 버전을 비교하는 로직 수정

* [Refactor] #311 최소 요구 버전 객체 네이밍 변경

* Fix/#322 도메인 주소 및 적용 방식 변경 (#323)

* [Add] api url 추가 및 적용 방식 변경 #322

* [Fix] Lint에 맞춰 컨벤션 적용 #322

* [Refactor] #322 변경된 도메인 url 적용

* [Fix] #325 앱 버전 수정 (#326)

* Fix/#319 Tuist 마이그레이션 및 사용 형태 수정 (#328)

* [Feat] Tuist update 스크립트 추가

* [Remove] tuist-version 파일 제거

* [Fix] Fastfile, Makefile 자동화 커멘드 수정

* [Fix] XCFramework 폴더 이동 및 레거시 제거

* [Feat] Firebase 래핑 모듈 및 인터페이스 모듈 추가

* [Fix] DependencyPlugin 제거 및 의존성 코드 Tuist 4 형태로 전환

* [Fix] Tuist 4 및 Swift 6 버전 대응

* feat: Tuist 선언형 작성을 위한 객체 추가

* fix: Project.swift Template 선언형으로 변경

* feat: 모듈 및 의존성을 나타내는 선언형 객체 구현

* fix: Project.swift 파일 선언형으로 변경

* fix: 불필요한 코드 제거 및 코드 정리

* fix: Github Action Tuist 4 버전에 맞게 수정

* fix: 오타 수정

* fix: 오타 수정

* fix: Tuist 모듈 폴더이동

* feat: Script 사용 형태 TargetScriptBuildable로 변경

* feat: InfoPlist 사용 형태 InfoPlistBuildable로 변경

* fix: Tuist gen 오류 수정

* fix: Tuist Plist 로직 수정

* fix: 누락된 App Plist값 추가

* fix: 잘못된 접근제어자 수정

* fix: fastlane 업데이트

* feat: Makefile 인증서 갱신 커멘드 추가

* fix: firebase 로그를 많이 출력하지 않도록

* fix: FCM 토큰 등록이 올바른 순서로 동작하도록

* fix: 로띠 의존성 임시 수정

* fix: ignore 파일 fetch 커멘드 rabbit 코드리뷰 반영

* Fix/#324 의존성 관리 형태 수정 (#327)

* [Refact] Injected 래퍼 사용형태 변경 및 DIContainer 크래시 로깅

* [Fix] 의존성 register, resolve 형태 수정

* [Fix] Rx 의존성 수정(SceneDelegate 컴파일 에러)

* [Chore] Lint 코드라인 경고 80 -> 90 수정

* [Chore] 코드정리

* [Chore] 누락된 접근제어자 추가

* [Fix] DIContainer Lock 추가

* fix: 불필요한 파일 제거

* fix: 빌드 오류 수정

* Refactor/#329 버스정류장 데이터 업데이트 및 관련 모델링 수정 (#338)

* refactor: version 변경 (#341)

* fix: 빌드 오류 수정

* fix: 아이패드 지원 제거

* fix: 문법 수정

---------

Co-authored-by: Geonseob Kim <109283556+gnksbm@users.noreply.github.com>
Co-authored-by: Geonseob Kim <gnksbm@gmail.com>
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.

[Refactor] 2025 버스정류장 정보 업데이트

2 participants