バス循環便のTrainType名に経由地を併記し、同名shape間の区別を明確化#1518
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughGTFS の循環(ループ)判定に基づき、代表バリエーションごとに日本語/roman の「経由地」を抽出して型名生成に反映するよう拡張しました。代表 trip の親停留所列から sibling が訪問しないユニーク停留所を選び via_for_rep / via_roman_for_rep を決定し、loop/roman の命名ルールを新設・適用しています。 Changesループバリエーション命名拡張(JA/roman 同期)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labelsfeature Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <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.
概要
バス循環便の
TrainType名が<headsign> (循環)のみで、どこを経由して戻ってくる便なのか分かりづらかった問題に対応。同じheadsignを持つ複数 shape(例: 池86 の「池袋駅東口」3 系統)も区別できるよう、経由地を併記し、行き先表記を<headsign>行形式に統一する。あわせてこれまで空文字だったtype_name_r(gRPC のnameRoman) を生成する。変更の種類
変更内容
type_name生成ロジックを更新(stationapi/src/import.rs)池袋駅東口 (循環)→池袋駅東口行(サンシャインシティ経由・循環)/池袋駅東口行(新宿伊勢丹前経由・循環)headsignを含む各ケースで「行」を付与<headsign>行(<経由地>経由・循環)/<headsign>行 (循環)<first_stop> → <headsign>行<headsign>行<A> ⇔ <B>は方向を表す表記のため変更なしroute_id× 同一headsignを持つ全 loop shape を sibling としてグループ化headsignと一致する場合はスキップして<headsign>行 (循環)にフォールバックrepresentative_trip_id分の(parent_id, stop_name, stop_name_r)を 1 本のANY($1)バルク SQL で取得し、N+1 のラウンドトリップを回避type_name_r(gRPC のnameRoman)を生成''を入れていたカラムを、gtfs_stops.stop_name_r/gtfs_routes.route_long_name_r(translations.txt の en 由来)から組み立てた英語表記で埋めるIkebukuro Sta. via Sunshine City (Loop)Ikebukuro Sta. (Loop)Sunshine City → Ikebukuro Sta.Ikebukuro Sta.Ikebukuro Sta. ⇔ Shinjuku-Isetantrip_headsign == last_stop_nameならlast_stop_name_rを採用(最も典型)first_stop_name_rを採用(loop なら first == last)route_long_nameから取られた場合、route_long_name_rを採用type_name_rを空文字のままにする(中途半端な日本語混じり防止)テスト
cargo fmt --all -- --checkが通ることcargo clippy -- -D warningsが通ることcargo test(SQLX_OFFLINE=true)が通ること関連Issue
スクリーンショット(任意)
Summary by CodeRabbit