Skip to content

近鉄種別修正#1405

Open
mittan12 wants to merge 35 commits intoTrainLCD:devfrom
mittan12:dev
Open

近鉄種別修正#1405
mittan12 wants to merge 35 commits intoTrainLCD:devfrom
mittan12:dev

Conversation

@mittan12
Copy link
Contributor

@mittan12 mittan12 commented Mar 5, 2026

No description provided.

TinyKitten and others added 30 commits July 21, 2025 03:48
* GetRoutesMinimal RPCを実装 (TrainLCD#1334)

* Add minimal route retrieval functionality and related proto types

* Refactor code formatting for improved readability in grpc.rs and query.rs

* Add line symbols to LineMinimal in get_lines_by_station_group_id

* Update subproject commit reference in stationapi/proto

* Add get_lines_by_id_list method and update QueryUseCase trait

* Refactor import order for improved readability in grpc.rs

* Use entry method for inserting line_minimal in all_lines to avoid overwriting

* Refactor route_row_tree_map creation into a separate build_route_tree_map method for improved readability

* Enhance line symbol handling in QueryInteractor: populate line_symbols for all lines and update line_minimal entries conditionally

* Refactor line symbol handling in QueryInteractor: update all_lines conditionally based on line_symbols presence

* Add AGENTS.md for automation agent and contributor workflow guidelines

* Update AGENTS.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* 石橋阪大前駅ローカライズ修正 (TrainLCD#1336)

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* GTFSバッチインポートの最適化

* insert_trips_batch関数に500行チャンク処理を追加
…nLCD#1370)

インポートが全て終わった後にANALYZEを実行するように修正
* SQLの致命的なバグをいくつか修正 (TrainLCD#1371)

* ひらがな混じりで駅検索ができないバグを修正

* get_train_types_by_station_idが動かないバグを修正

* GetStationsByLineGroupIdの修正

* ユニットテスト拡充

* cargo fmt

* バス路線はline_typeをOtherLineTypeに強制 (TrainLCD#1372)

* direction_idがNULLのトリップに存在するバス停も正しく取り込むよう修正 (TrainLCD#1373)

* direction_idがNULLのトリップに存在するバス停も正しく取り込むよう修正

GTFSの仕様ではdirection_idはオプショナルであり、NULLの場合でも
バス停は有効な停留所として扱うべきである。

これまではvariant_only_with_neighbors CTEで「direction_id IS NOT NULL」
のトリップにのみ存在するバス停をフィルタリングしていたため、
早81の原宿駅前や渋谷駅東口などのバス停がレスポンスから除外されていた。

* バリアントバス停の位置推定でメイントリップに存在する隣接バス停を優先

variant_only_with_neighborsでバス停の隣接情報を選択する際に、
隣接バス停(prev_stop_id/next_stop_id)がメイントリップに存在する
レコードを優先するよう修正。

これにより、原宿駅前などのバス停がより正確な位置に挿入される。

---------

Co-authored-by: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
* 春日原駅を特急停車駅に指定

* 聖マリア病院前の駅名修正
* GetStationsByLineIdList RPC追加

複数のline_idを一括で処理するバッチRPCを追加。
既存のGetStationByIdList/GetLineByIdListと同じバッチパターンに従う。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* cargo fmt

* get_by_line_id_vecのORDER BYを入力順序保持のCASE式に変更

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Merge pull request TrainLCD#1389 from TrainLCD/feature/tt-batch

GetStationsByLineGroupIdList RPC追加

* get_stations_by_line_group_id_vecで列車種別を一括取得してセット (TrainLCD#1390)

* get_stations_by_line_group_id_vecで列車種別を一括取得してセット

N+1問題を回避しつつ、train_type_repository.get_by_line_group_id_vecで
複数line_group_idの列車種別を1クエリで取得し、top-levelとlines[].station
の両方にセットするよう修正。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* get_stations_by_line_group_id_vecのユニットテストを追加

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* ネストされた駅のtrain_typeをis_some()で明示的に検証するよう修正

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* train_typeをtrain_type_mapから常に上書きしてリーク防止

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 5, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (2)
  • data/4!types.csv is excluded by !**/*.csv
  • data/5!station_station_types.csv is excluded by !**/*.csv

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 00205019-891e-4075-b8ac-8481daa9390c

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@TinyKitten
Copy link
Member

ご協力ありがとうございます。

validatorが [INVALID] Unrecognized Station ID "3100374" Found! というエラーでデータ不整合を検出しているので後ほどこちらで確認いたします。

TinyKitten pushed a commit that referenced this pull request Mar 5, 2026
github.event.workflow_run.pull_requests[0].number can be empty when
GitHub cannot resolve the PR association (e.g., head and base branch
are the same name). This caused the "Find existing comment" step to
fail with an empty issue-number on PR #1405.

Fix by using the event context when available and falling back to the
pr_number saved in the artifact. All downstream steps now reference
steps.meta.outputs.pr_number for consistency.

https://claude.ai/code/session_01Lr3k5y8UYcH26a8hndo8ek
TinyKitten pushed a commit that referenced this pull request Mar 5, 2026
github.event.workflow_run.pull_requests[0].number can be empty when
GitHub cannot resolve the PR association (e.g., head and base branch
share the same name). This caused the comment step to fail on PR #1405.

Use event context when available, fall back to artifact pr_number file.
All downstream steps reference steps.meta.outputs.pr_number.

https://claude.ai/code/session_01Lr3k5y8UYcH26a8hndo8ek
TinyKitten added a commit that referenced this pull request Mar 5, 2026
github.event.workflow_run.pull_requests[0].number can be empty when
GitHub cannot resolve the PR association (e.g., head and base branch
share the same name). This caused the comment step to fail on PR #1405.

Use event context when available, fall back to artifact pr_number file.
All downstream steps reference steps.meta.outputs.pr_number.

https://claude.ai/code/session_01Lr3k5y8UYcH26a8hndo8ek

Co-authored-by: Claude <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

🚉 停車駅の変更

4 件の新しい停車パターン | 16 件の削除された停車パターン

● 停車 / ○ 通過 / △ 一部通過 / ◆ 平日停車 / ◇ 休日停車 / ▲ 一部停車

注意: 31 件中 20 件のみ表示しています。

🗑️ 急行 (Express) - 近鉄名古屋線 / 近鉄山田線 / 近鉄鳥羽線

type_cd=304, line_group_cd=111

変更内容: 63 駅削除

🗑️ 急行 (Express) - 近鉄京都線 / 近鉄橿原線

type_cd=304, line_group_cd=317

変更内容: 43 駅削除

🗑️ 急行 (Express) - 近鉄京都線

type_cd=304, line_group_cd=320

変更内容: 28 駅削除

🗑️ 急行 (Express) - 近鉄京都線 / 近鉄橿原線 / 近鉄天理線

type_cd=304, line_group_cd=323

変更内容: 37 駅削除

🗑️ 急行 (Express) - 近鉄南大阪線 / 近鉄吉野線

type_cd=304, line_group_cd=327

変更内容: 44 駅削除

🗑️ 急行 (Express) - 近鉄南大阪線 / 近鉄長野線

type_cd=304, line_group_cd=331

変更内容: 24 駅削除

🗑️ 急行 (Express) - 近鉄難波線 / 近鉄奈良線

type_cd=304, line_group_cd=334

変更内容: 25 駅削除

🗑️ 急行 (Express) - 近鉄大阪線 / 近鉄山田線 / 近鉄鳥羽線

type_cd=304, line_group_cd=340

変更内容: 64 駅削除

🗑️ 急行 (Express) - 近鉄山田線 / 近鉄鳥羽線

type_cd=304, line_group_cd=343

変更内容: 19 駅削除

🗑️ 急行 (Express) - 京都市営地下鉄烏丸線 / 近鉄京都線

type_cd=304, line_group_cd=374

変更内容: 39 駅削除

🗑️ 急行 (Express) - 近鉄京都線

type_cd=304, line_group_cd=377

変更内容: 19 駅削除

🗑️ 急行 (Express) - 近鉄名古屋線 / 近鉄鈴鹿線

type_cd=304, line_group_cd=617

変更内容: 14 駅削除

🗑️ 区間急行 (Section Express) - 近鉄南大阪線

type_cd=319, line_group_cd=326

変更内容: 28 駅削除

🗑️ 快速急行 (Rapid Express) - 阪神本線 / 阪神なんば線 / 近鉄難波線 / 近鉄奈良線

type_cd=330, line_group_cd=335

変更内容: 60 駅削除

🗑️ 快速急行 (Rapid Express) - 近鉄大阪線 / 近鉄山田線 / 近鉄鳥羽線

type_cd=330, line_group_cd=341

変更内容: 67 駅削除

🗑️ 快速急行 (Rapid Express) - 近鉄山田線 / 近鉄鳥羽線

type_cd=330, line_group_cd=344

変更内容: 19 駅削除

🆕 区間急行 (Sub. Express) - 近鉄南大阪線

type_cd=374, line_group_cd=326

変更内容: 28 駅追加

全駅リスト (28駅)
# 駅名 Station 停車
1 大阪阿部野橋 Osaka-Abenobashi
2 河堀口 Koboreguchi
3 北田辺 Kita-Tanabe
4 今川 Imagawa
5 針中野 Harinakano
6 矢田 Yata
7 河内天美 Kawachi-Amami
8 布忍 Nunose
9 高見ノ里 Takaminosato
10 河内松原 Kawachi-Matsubara
11 恵我ノ荘 Eganosho
12 高鷲 Takawashi
13 藤井寺 Fujiidera
14 土師ノ里 Hajinosato
15 道明寺 Domyoji
16 古市 Furuichi
17 駒ヶ谷 Komagatani
18 上ノ太子 Kaminotaishi
19 3100374 ****
20 二上神社口 Nijojinjaguchi
21 当麻寺 Taimadera
22 磐城 Iwaki
23 尺土 Shakudo
24 高田市 Takadashi
25 浮孔 Ukiana
26 坊城 Bojo
27 橿原神宮西口 Kashiharajingu-nishiguchi
28 橿原神宮前 Kashiharajingu-mae

🆕 急行 (Express) - 近鉄名古屋線 / 近鉄山田線 / 近鉄鳥羽線

type_cd=375, line_group_cd=111

変更内容: 63 駅追加

全駅リスト (63駅)
# 駅名 Station 停車
1 近鉄名古屋 Kintetsu-Nagoya
2 米野 Komeno
3 黄金 Kogane
4 烏森 Kasumori
5 近鉄八田 Kintetsu-Hatta
6 伏屋 Fushiya
7 戸田 Toda
8 近鉄蟹江 Kintetsu-Kanie
9 富吉 Tomiyoshi
10 佐古木 Sakogi
11 近鉄弥富 Kintetsu-Yatomi
12 近鉄長島 Kintetsu-Nagashima
13 桑名 Kuwana
14 益生 Masuo
15 伊勢朝日 Ise-Asahi
16 川越富洲原 Kawagoe-Tomisuhara
17 近鉄富田 Kintetsu-Tomida
18 霞ヶ浦 Kasumigaura
19 阿倉川 Akuragawa
20 川原町 Kawaramachi
21 近鉄四日市 Kintetsu-Yokkaichi
22 新正 Shinsho
23 海山道 Miyamado
24 塩浜 Shiohama
25 北楠 Kita-Kusu
26 Kusu
27 長太ノ浦 Nagonoura
28 箕田 Mida
29 伊勢若松 Ise-Wakamatsu
30 千代崎 Chiyozaki
31 白子 Shiroko
32 鼓ヶ浦 Tsudumigaura
33 磯山 Isoyama
34 千里 Chisato
35 豊津上野 Toyotsu-Ueno
36 白塚 Shiratsuka
37 高田本山 Takadahonzan
38 江戸橋 Edobashi
39 Tsu
40 津新町 Tsu-shimmachi
41 南が丘 Minamigaoka
42 久居 Hisai
43 桃園 Momozono
44 伊勢中川 Ise-Nakagawa
45 伊勢中川 Ise-Nakagawa
46 伊勢中原 Ise-Nakahara
47 松ヶ崎 Matsugasaki
48 松阪 Matsusaka
49 東松阪 Higashi-Matsusaka
50 櫛田 Kushida
51 漕代 Koishiro
52 斎宮 Saiku
53 明星 Myojo
54 明野 Akeno
55 小俣 Obata
56 宮町 Miyamachi
57 伊勢市 Iseshi
58 宇治山田 Ujiyamada
59 宇治山田 Ujiyamada
60 五十鈴川 Isuzugawa
61 朝熊 Asama
62 池の浦 Ikenoura
63 鳥羽 Toba

🆕 急行 (Express) - 近鉄京都線 / 近鉄橿原線

type_cd=375, line_group_cd=317

変更内容: 43 駅追加

全駅リスト (43駅)
# 駅名 Station 停車
1 京都 Kyōto
2 東寺 Toji
3 十条 Jujo
4 上鳥羽口 Kamitobaguchi
5 竹田 Takeda
6 伏見 Fushimi
7 近鉄丹波橋 Kintetsu-Tambabashi
8 桃山御陵前 Momoyamagoryomae
9 向島 Mukaijima
10 小倉 Ogura
11 伊勢田 Iseda
12 大久保 Okubo
13 久津川 Kutsukawa
14 寺田 Terada
15 富野荘 Tonosho
16 新田辺 Shin-Tanabe
17 興戸 Kodo
18 三山木 Miyamaki
19 近鉄宮津 Kintetsu-Miyazu
20 狛田 Komada
21 新祝園 Shin-Hosono
22 木津川台 Kizugawadai
23 山田川 Yamadagawa
24 高の原 Takanohara
25 平城 Heijo
26 大和西大寺 Yamato-Saidaiji
27 大和西大寺 Yamato-Saidaiji
28 尼ヶ辻 Amagatsuji
29 西ノ京 Nishinokyo
30 九条 Kujo
31 近鉄郡山 Kintetsu-Koriyama
32 筒井 Tsutsui
33 平端 Hirahata
34 ファミリー公園前 Family-Koenmae
35 結崎 Yuzaki
36 石見 Iwami
37 田原本 Tawaramoto
38 笠縫 Kasanui
39 新ノ口 Ninokuchi
40 大和八木 Yamato-Yagi
41 八木西口 Yagi-Nishiguchi
42 畝傍御陵前 Unebigoryomae
43 橿原神宮前 Kashiharajingu-mae

🆕 急行 (Express) - 近鉄京都線

type_cd=375, line_group_cd=320

変更内容: 28 駅追加

全駅リスト (28駅)
# 駅名 Station 停車
1 京都 Kyōto
2 東寺 Toji
3 十条 Jujo
4 上鳥羽口 Kamitobaguchi
5 竹田 Takeda
6 伏見 Fushimi
7 近鉄丹波橋 Kintetsu-Tambabashi
8 桃山御陵前 Momoyamagoryomae
9 向島 Mukaijima
10 小倉 Ogura
11 伊勢田 Iseda
12 大久保 Okubo
13 久津川 Kutsukawa
14 寺田 Terada
15 富野荘 Tonosho
16 新田辺 Shin-Tanabe
17 興戸 Kodo
18 三山木 Miyamaki
19 近鉄宮津 Kintetsu-Miyazu
20 狛田 Komada
21 新祝園 Shin-Hosono
22 木津川台 Kizugawadai
23 山田川 Yamadagawa
24 高の原 Takanohara
25 平城 Heijo
26 大和西大寺 Yamato-Saidaiji
27 新大宮 Shin-Omiya
28 近鉄奈良 Kintetsu-Nara

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

❌ データ整合性チェックに失敗しました

5!station_station_types.csv に存在しない外部キーへの参照が含まれています。

不正な Station ID (1 件)

3!stations.csv に存在しない station_cd が参照されています。

該当レコード一覧
行データ
DEFAULT,3100374,374,326,1,二上山

Copy link
Member

@TinyKitten TinyKitten left a comment

Choose a reason for hiding this comment

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

ご協力ありがとうございます。整合性エラーの原因が判明いたしましたのでお手数ですが修正の程よろしくお願い致します。

DEFAULT,3100316,374,326,0,古市
DEFAULT,3100317,374,326,1,駒ヶ谷
DEFAULT,3100318,374,326,1,上ノ太子
DEFAULT,3100374,374,326,1,二上山
Copy link
Member

Choose a reason for hiding this comment

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

[must]
二上山駅のIDは 3100319 です。お手数ですが、修正をお願いします。

Suggested change
DEFAULT,3100374,374,326,1,二上山
DEFAULT,3100319,374,326,1,二上山

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.

2 participants