-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from codeclassroom/dev
0.4 release
- Loading branch information
Showing
12 changed files
with
172 additions
and
86 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
"""Usage example""" | ||
import os | ||
import pprint | ||
from plagcheck import plagcheck | ||
from plagcheck.plagcheck import check, insights, share_scores | ||
|
||
from dotenv import load_dotenv | ||
load_dotenv() | ||
|
||
language = "python" | ||
language = "java" | ||
userid = os.environ["USER_ID"] | ||
|
||
|
||
moss = plagcheck.check(language, userid) | ||
moss = check(language, userid) | ||
|
||
moss.addFilesByWildCard("testfiles/test_python*.py") | ||
moss.addFilesByWildCard("testfiles/test_java*.java") | ||
|
||
# or moss.addFile("testfiles/test_python.py") | ||
|
||
moss.submit() | ||
|
||
print(moss.getHomePage()) | ||
pprint.pprint(moss.getResults()) | ||
# print frequency of each shared solution | ||
pprint.pprint(moss.getShareScores()) | ||
|
||
result = moss.getResults() | ||
|
||
pprint.pprint(result) | ||
|
||
# print potential distributor-culprit relationships | ||
pprint.pprint(moss.getInsights()) | ||
pprint.pprint(insights(result)) | ||
# print frequency of each shared solution | ||
pprint.pprint(share_scores(result)) |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Insights | ||
|
||
PlagCheck provides algorithmic analysis of Moss results. | ||
|
||
### Terminologies | ||
|
||
### 1. Node | ||
Nodes are results returned by Moss i.e every | ||
individual file. | ||
|
||
### 2. Tags | ||
Tags are roles which a file serves i.e. a tag is | ||
a potential distributor or potential culprit or | ||
both. | ||
|
||
### 3. M-group | ||
m-groups (moss-groups) are groups of solution which have similar code. | ||
For example A student who solves a programming problem may share their | ||
solution with 3 of his/her friends, that is a single m-group with 4 nodes. | ||
|
||
For example if you run [demo.py](https://github.com/codeclassroom/PlagCheck/blob/master/demo.py), `insights()` will return the following data: | ||
```java | ||
|
||
{'DCtoC Paths': [('testfiles/test_java5.java', 'testfiles/test_java2.java'), | ||
('testfiles/test_java4.java', 'testfiles/test_java2.java')], | ||
'DtoC Paths': [('testfiles/test_java3.java', 'testfiles/test_java2.java'), | ||
('testfiles/test_java3.java', 'testfiles/test_java.java'), | ||
('testfiles/test_java7.java', 'testfiles/test_java6.java')], | ||
'DtoDC Paths': [('testfiles/test_java3.java', 'testfiles/test_java5.java'), | ||
('testfiles/test_java3.java', 'testfiles/test_java4.java')]} | ||
|
||
``` | ||
|
||
This analysis can be visualized into following _Disconnected Directed Graph_ | ||
|
||
 | ||
|
||
We assign Tags to every individual Node. | ||
|
||
1. D - Distributor | ||
Student(s) who distributed their | ||
code in a group. | ||
2. C - Culprit | ||
Student(s) who copied the shared | ||
code. | ||
3. DC - Both a Distributor & Culprit | ||
|
||
In the above depicted graph, there are 2 unique _m-groups_. | ||
|
||
1. Group 1 : [1, 2, 3, 4, 5] | ||
2. Group 2 : [7, 6] |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
"""The MOSS interface package for CodeClassroom""" | ||
from plagcheck.plagcheck import check | ||
from plagcheck.plagcheck import check, insights, share_scores |
This file contains 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
This file contains 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
Oops, something went wrong.