fyrestone / pycode_similar

A simple plagiarism detection tool for python code
MIT License
176 stars 38 forks source link

Usage without functions? #1

Closed frenzymadness closed 4 years ago

frenzymadness commented 5 years ago

Hello.

First, thanks for your work, it's great.

I would like to use pycode_similar to check students' homeworks in my Python class. The problem is that the code they write is very basic at the beginning so they don't use functions.

Is there any way how to use pycode_similar to check files without functions? If it's possible but not implemented yet, let me know and I'll take a look at how to do it.

Thanks a lot.

fyrestone commented 5 years ago

Sorry for the inconvenience.

Currently, pycode_simiaris not implemented compare module code feature. But, it is not hard to implement it. As far as I know, python interpreter treat module code as a function internally. When importing a module (main module is the same), python will execute the module code as calling a function. So, maybe a feasible solution is preprocess the source first, treat the module function specially when detecting plagiarism.

I will add the feature as soon as possible, and pycode_similar also welcome a pull request :).

maxkraft7 commented 4 years ago

I would also like this feature to be implemented

helenocampos commented 4 years ago

Any news on this topic?