-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update gtfs parser interface #81
Conversation
ウォークスルー変更全体の概要を簡潔に示します。 変更点
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this 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
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- README.md (1 hunks)
- gtfs_go_dialog.py (5 hunks)
- gtfs_parser (1 hunks)
Files skipped from review due to trivial changes (1)
- gtfs_parser
Additional Context Used
LanguageTool (3)
README.md (3)
Near line 25: Possible missing comma found.
Context: ...FS tables has routes-data and stops-data but tables-structure is somewhat complicate...
Near line 32: This word is normally spelled as one.
Context: ...ng" width="80%"> GTFS also has service time-table information. This plugin can aggregate ...
Near line 35: The noun should probably be in the singular form.
Context: ...with lines indicate a frequency of each lines, set on left side towards direction of ...
Ruff (30)
gtfs_go_dialog.py (30)
25-51: Import block is un-sorted or un-formatted
34-34:
from PyQt5.QtCore import *
used; unable to detect undefined names
35-35:
from PyQt5.QtGui import *
used; unable to detect undefined names
36-36:
from PyQt5.QtWidgets import *
used; unable to detect undefined names
37-37:
from qgis.core import *
used; unable to detect undefined names
38-38:
from qgis.gui import *
used; unable to detect undefined names
57-57:
QDialog
may be undefined, or defined from star imports
103-103:
QDate
may be undefined, or defined from star imports
116-116:
QAbstractItemView
may be undefined, or defined from star imports
130-130:
QDate
may be undefined, or defined from star imports
134-134:
QgsCoordinateReferenceSystem
may be undefined, or defined from star imports
337-337: Argument name
lineEdit
should be lowercase
351-351:
QgsProject
may be undefined, or defined from star imports
356-356:
QgsVectorLayer
may be undefined, or defined from star imports
362-362:
QgsProject
may be undefined, or defined from star imports
366-366:
QgsVectorLayer
may be undefined, or defined from star imports
381-381:
QgsProject
may be undefined, or defined from star imports
385-385:
QgsVectorLayer
may be undefined, or defined from star imports
394-394:
QgsProject
may be undefined, or defined from star imports
398-398:
QgsVectorLayer
may be undefined, or defined from star imports
414-414:
QgsSymbolLayer
may be undefined, or defined from star imports
415-415:
QgsSymbolLayer
may be undefined, or defined from star imports
419-419:
QgsProject
may be undefined, or defined from star imports
423-423:
QgsVectorLayer
may be undefined, or defined from star imports
430-430:
QgsProject
may be undefined, or defined from star imports
526-526:
QMessageBox
may be undefined, or defined from star imports
547-547: Variable
proxyModel
in function should be lowercase
547-547:
QSortFilterProxyModel
may be undefined, or defined from star imports
549-549:
Qt
may be undefined, or defined from star imports
556-556:
Qt
may be undefined, or defined from star imports
Additional comments not posted (4)
README.md (1)
67-67
: 停止統合基準の変更を確認しました。緯度経度平面での最大距離が0.01度から0.003度に厳格化されています。これにより、停止のグループ化の精度が向上すると考えられます。gtfs_go_dialog.py (3)
231-231
: パーサーのインスタンス化方法がgtfs_parser.GTFS
からgtfs_parser.GTFSFactory
に変更されています。これにより、設定やGTFSデータのタイプに応じて柔軟にインスタンスを生成できるようになる可能性があります。
Line range hint
281-310
:read_stop_relations()
関数を使用して停止関係データを読み込み、UTF-8エンコーディングでCSVファイルに書き込む処理が追加されています。データの互換性と標準化が向上しています。
428-428
: CSVファイルのプロバイダエンコーディングをUTF-8に設定しています。これにより、エンコーディングの問題を防ぎ、データの正確な読み取りが保証されます。
There was a problem hiding this 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
Out of diff range and nitpick comments (1)
gtfs_go_dialog.py (1)
Line range hint
34-38
: ワイルドカードインポート(from PyQt5.QtCore import *
など)は、未定義の名前が発生する可能性があるため、推奨されません。具体的なクラスや関数を明示的にインポートすることをお勧めします。- from PyQt5.QtCore import * - from PyQt5.QtGui import * - from PyQt5.QtWidgets import * - from qgis.core import * - from qgis.gui import * + from PyQt5.QtCore import QDateTime, QFile, QFileInfo + from PyQt5.QtGui import QIcon, QPixmap + from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget + from qgis.core import QgsApplication, QgsProviderRegistry + from qgis.gui import QgsMapCanvas, QgsMessageBar
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- gtfs_go_dialog.py (5 hunks)
Additional Context Used
Ruff (30)
gtfs_go_dialog.py (30)
25-51: Import block is un-sorted or un-formatted
34-34:
from PyQt5.QtCore import *
used; unable to detect undefined names
35-35:
from PyQt5.QtGui import *
used; unable to detect undefined names
36-36:
from PyQt5.QtWidgets import *
used; unable to detect undefined names
37-37:
from qgis.core import *
used; unable to detect undefined names
38-38:
from qgis.gui import *
used; unable to detect undefined names
57-57:
QDialog
may be undefined, or defined from star imports
103-103:
QDate
may be undefined, or defined from star imports
116-116:
QAbstractItemView
may be undefined, or defined from star imports
130-130:
QDate
may be undefined, or defined from star imports
134-134:
QgsCoordinateReferenceSystem
may be undefined, or defined from star imports
338-338: Argument name
lineEdit
should be lowercase
352-352:
QgsProject
may be undefined, or defined from star imports
357-357:
QgsVectorLayer
may be undefined, or defined from star imports
363-363:
QgsProject
may be undefined, or defined from star imports
367-367:
QgsVectorLayer
may be undefined, or defined from star imports
382-382:
QgsProject
may be undefined, or defined from star imports
386-386:
QgsVectorLayer
may be undefined, or defined from star imports
395-395:
QgsProject
may be undefined, or defined from star imports
399-399:
QgsVectorLayer
may be undefined, or defined from star imports
415-415:
QgsSymbolLayer
may be undefined, or defined from star imports
416-416:
QgsSymbolLayer
may be undefined, or defined from star imports
420-420:
QgsProject
may be undefined, or defined from star imports
424-424:
QgsVectorLayer
may be undefined, or defined from star imports
431-431:
QgsProject
may be undefined, or defined from star imports
527-527:
QMessageBox
may be undefined, or defined from star imports
548-548: Variable
proxyModel
in function should be lowercase
548-548:
QSortFilterProxyModel
may be undefined, or defined from star imports
550-550:
Qt
may be undefined, or defined from star imports
557-557:
Qt
may be undefined, or defined from star imports
Additional comments not posted (2)
gtfs_go_dialog.py (2)
231-231
: インスタンス生成方法の変更を確認しました。gtfs_parser.GTFS
からgtfs_parser.GTFSFactory
への変更は、柔軟性と標準化を向上させるための良いステップです。
Line range hint
281-311
: 停留所関連データの取り扱いとエンコーディングの変更を確認しました。UTF-8への変更は、より広範なシステムとの互換性を保証します。ただし、errors='ignore'
の使用には注意が必要です。データ損失を避けるために、エラーが発生した場合は適切に処理することをお勧めします。
LGTM! |
Close Issues
Description(変更内容)
With the update of gtfs-parser, the parsing and aggregation process will be several times faster.
The following changes were made to update gtfs_parser.
GTFSFactory
.read_stop_relations()
I suggest that this be a major version up since the required Python and QGIS versions have been raised.
Manual Testing(手動テスト)
Please check in QGIS on your Mac OS.