vhsw / PlagCheck

The Plagiarism Checker Package for CodeClassroom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PlagCheck ✅

The MOSS interface package for CodeClassroom

Installation 🔮

  1. Create virtual environment.

    Linux/MacOS

    virtualenv -p python3 venv && cd venv && source bin/activate

    Windows (PowerShell)

    py -m venv venv; .\venv\Scripts\activate;
  2. Clone the repository.

    git clone https://github.com/codeclassroom/PlagCheck.git
  3. Install dependencies.

    pip install -r requirements.txt
  4. Set-up virtual environment variables.

    1. Create a file named .env in the root directory & add the following contents.

      USER_ID = 'moss-user-id'
      
    2. For USER_ID read instructions on Moss.

  5. Run demo.py for demo.

Usage

Import the check method from PlagCheck.

import os
import pprint
from plagcheck import plagcheck

program_files = ["testfiles/test_python.py", "testfiles/test_python3.py"]
language = "python"
userid = os.environ["USER_ID"]

url, results = plagcheck.check(program_files, language, userid)


print(url)
pprint.pprint(results)

Read Documentation.

TODO

Fetch the URL and gather following results:

  • Percentage of Code Matches

  • Number of Lines Matched

  • URL itself

  • Lines Matched*

  • Return a list of dictionaries containing:

    [
      {
        "file1":"filename1.py",
        "file2":"filename2.py",
        "percentage": 34,
        "no_of_lines_matched": 3,
        "lines_matched":[["2-3", "10-11"]]
      },
    ....
    ]

Author

👥 Bhupesh Varshney

About

The Plagiarism Checker Package for CodeClassroom


Languages

Language:Python 75.7%Language:Java 24.3%