Repository navigation
Phase 2: 描画経路のコード生成化と、Pythonコードタブの刷新 - #2
Merged
Merged
Conversation
dataprep.plan_plot decides everything that needs the DataFrame, codegen turns settings into a readable matplotlib script, and the loader now keeps the encoding, separator and sheet name for the script's load section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both the preview and the saved image now run the script codegen produces (runner.run_script), the Python API returns the script, output and a figure summary, and edit-mode scripts run against the uploaded file in the work folder. The legacy custom-code namespace and GUI overrides are removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e API Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add an edit-mode run row to the benchmark and the Phase 2 results. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <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.
要件定義書9章の Phase 2(P1–P7、A8)を実装しました。Phase 1 で残した2件(複数系列の棒グラフでカテゴリ名が消える、カスタムコードのエラーが英語のまま出る)も直しています。
変更内容
描画経路の一本化(P1、P7)
dataprep.plan_plot(検査・警告)→codegen.generate_script(スクリプト生成)→runner(実行)→ PNG」の1経路にした。plotting.pyは削除。py/mplgui/dataprep.py、codegen.py、formats.py(保存形式の表とファイル名の規則。循環 import を避けるため)。fig.savefig+plt.show())。列はdf.iloc[:, N]で参照し、列名はコメントに書く。dfを渡して実行する(P5)。literal()(repr)とcomment_text()を通す。CSV の列名を細工したコード注入を防ぐ。Pythonコードタブ(P2–P6、A8)
printの出力と、行番号・該当行付きのトレースバックを表示する。ステータスは日本語(例:「11行目、NameError: 定義されていない名前を使っています」)(P6)。その他
Phase 1 との PNG 比較(27通り、dpi 100)
21通りはバイト単位で一致。差が出た6通りは、すべて棒グラフのカテゴリ名(Phase 1 は
set_xscaleが目盛を消し、0, 1, 2… を表示していた)。保存経路(dpi 120)の PNG・透過 PNG・JPG・PDF も一致。SVG は matplotlib のランダムな ID の差だけ(ID をそろえると一致)。
計測値(
docs/PERFORMANCE.md「Phase 2 後」)10,000行×5系列で、設定変更から再描画まで 466 ms(デバウンス込み)。1秒以内の要件を満たす。悪くなった項目はない。
オーナーが決めたこと(2026-10-08。AGENTS.md §13 に記録)
get_plot_data、旧形式の settings dict、plotted_count)は互換を残さず廃止。fig.savefig(...)(GUI の「保存」と同じ形式・解像度)とplt.show()。useCustomCodeは削除。ax.set_xscale("linear")を入れる)。Phase 4 の D5(日時軸)で見直す。要件定義書との差(未対応。判断待ち)
dataprep.pyとformats.pyがない。skiprows=を足す場所をコメントで示すだけにした。テスト
E2E_BASE_PATH=/matplotlib_gui/でも 41 passed)🤖 Generated with Claude Code