GumTreeDiff / gumtree

An awesome code differencing tool
https://github.com/GumTreeDiff/gumtree/wiki
GNU Lesser General Public License v3.0
893 stars 170 forks source link

Steps to get AST Diff for Python Files #342

Closed SagarBhatia closed 1 month ago

SagarBhatia commented 4 months ago

I have 2 .py files for which I need to get the AST Diff. I installed Gumtree and pythonparser in my Windows system but I couldn't find exact steps how to get Diff of python files. Can anyone tell me the detailed steps I need to follow to get AST Diff of python files.?

jrfaller commented 3 months ago

Anything not detailed enough in https://github.com/GumTreeDiff/gumtree/wiki/Getting-Started ?

SagarBhatia commented 3 months ago

I am currently getting this error. I have python parser and added that in PATH. Not getting any Output on Localhost stating 500 Internal Server error.

But If I Go to pythonparser extracted folder and Run- "python pythonparser file.py" then I am getting XML Tree structure as output To Run pythonparser from Command line in windows, I need Executable pythonparser.exe file into PATH. Right now I have added the directory where pythonparser is installed cause I couldn't find any executable file in that folder.

gumtreeError

Image from inside pythonparser folder- image

jrfaller commented 3 months ago

I am no Windows expert but it looks like a path problem!

SagarBhatia commented 3 months ago

If we run webdiff, it displays diff on web browser. How can I get the raw Diff code? I want to use/integrate Gumtree as tool and use the Diff Output for further process. How can I be able to do it?

jrfaller commented 3 months ago

Hi!

You need to use the Java API! https://github.com/GumTreeDiff/gumtree/wiki/GumTree-API