PDChecker 是一個實驗性的針對 pandas
的靜態分析工具,
用於追蹤 DataFrame
, Series
的欄位與型別資訊進行型別檢查工作。
目前還在極度早期的開發階段,為概念實作等級。
環境要求: Python 3.8
在這個初步階段,可以透過下列步驟來實驗此工具
-
透過
git clone
或是下載的方始取得原始碼 -
(可選)使用 Virtual Environment 來準備環境
python3.8 -m venv venv source venv/bin/activate
-
安裝相依套件
pip install -r requirements.txt
-
使用指令列或是LSP來檢查
pandas
程式碼$ cd example; python ../checker.py ex.py 4 2 Index 'not_existed' not found.
lsp.py
是一個 Language Server,執行後會在 localhost:8080
。
checker.py
為檢查語意的直譯器spec.py
為檢查語意中函數的定義lsp.py
為 LSP Server 的實作