Closed bordoray closed 1 month ago
この変更により、Converter
クラスが QThread
のサブクラスになり、長時間処理を非同期で実行できるようになりました。これにより、ユーザーインターフェイスがブロックされることなく、進捗状況の更新やメッセージの送信が可能になります。また、dem.py
では、メタデータ処理の方法が整理され、XMLパスのフィルタリングが改善されました。テストも新しいスレッド処理に対応しました。
ファイル | 変更概要 |
---|---|
src/.../converter.py |
Converter クラスを QThread サブクラスに変更し、run メソッドを追加。進捗を更新するための pyqtSignal を追加し、非同期処理を実装。 |
src/.../dem.py |
コンストラクタで contents_to_array メソッドを呼び出すように変更。XMLパスのフィルタリングを改善し、メタデータ収集が明確に。_get_xml_content_list を _get_metadata_list に置換。 |
tests/.../test_converter.py |
Converter インスタンスをスレッドとして生成し、start() メソッドを呼び出すように変更。テスト実行時のパフォーマンス向上。 |
sequenceDiagram
participant User
participant UI
participant Converter
participant DEM
User->>UI: Convert DEM
UI->>Converter: Start conversion (start())
Converter->>DEM: Read XML paths
DEM-->>Converter: Metadata list
Converter->>UI: setMaximum
Converter->>UI: addProgress
Converter->>UI: postMessage
Converter->>UI: processFinished
うさぎの詩です。
変化の風が舞い上がり、
新しい道を照らし出す。
スレッドの森で跳ね回り、
進捗の歌を奏でる。
効率の芽、花開く。
みんなで祝おう、わくわくの時を! 🐇✨
Close #0
Description(変更内容)
Summary by CodeRabbit
新機能
Converter
クラスがスレッドとして動作するように変更され、長時間のタスクをブロックせずに実行可能に。バグ修正
ドキュメンテーション