analyze
Analyzes import graphs from a project entry point to automatically classify packages as stubbable, nofollow, or required based on usage, helping reduce executable size by generating stub code.
Instructions
プロジェクトのエントリーポイントから import グラフを解析し、 スタブ置換可能なパッケージを自動検出します。
各パッケージは以下のいずれかに判定されます:
stubbable: スタブ化可能(プロジェクトの実行パスで未使用)
nofollow: try/except 保護あり(--nofollow-import-to で除外推奨)
required: スタブ化不可(実際に使用されている)
Args: entry_point: プロジェクトのエントリーポイントファイルパス python_path: site-packages パス(空の場合は現在の環境を自動検出) max_depth: import グラフの最大探索深度(デフォルト: 10)
Returns: stubbable / nofollow / required に分類されたパッケージ一覧
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entry_point | Yes | ||
| python_path | No | ||
| max_depth | No |