Skip to content
/ moss.py Public
forked from soachishti/moss.py

Python client for Moss: A System for Detecting Software Similarity

License

Notifications You must be signed in to change notification settings

rsxss/moss.py

This branch is 1 commit behind soachishti/moss.py:master.

Folders and files

NameName
Last commit message
Last commit date
Apr 20, 2021
Aug 26, 2020
Oct 18, 2017
Oct 18, 2017
Sep 10, 2017
Apr 20, 2021
May 20, 2019
Apr 20, 2021
May 20, 2019
Apr 20, 2021

Repository files navigation

moss.py

A Python client for Moss: A System for Detecting Software Similarity

Introduction

It is a Python interface for Moss client. It was written for AutoGrader for handling similarity in Python assignment submission.

It was written using the original bash script/documentation and its PHP dialect.

Installation

pip install mosspy

Usage

import mosspy

userid = 987654321

m = mosspy.Moss(userid, "python")

m.addBaseFile("submission/a01.py")
m.addBaseFile("submission/test_student.py")

# Submission Files
m.addFile("submission/a01-sample.py")
m.addFilesByWildcard("submission/a01-*.py")

# progress function optional, run on every file uploaded
# result is submission URL
url = m.send(lambda file_path, display_name: print('*', end='', flush=True))
print()

print ("Report Url: " + url)

# Save report file
m.saveWebPage(url, "submission/report.html")

# Download whole report locally including code diff links
mosspy.download_report(url, "submission/report/", connections=8, log_level=10, on_read=lambda url: print('*', end='', flush=True)) 
# log_level=logging.DEBUG (20 to disable)
# on_read function run for every downloaded file

Python Compatibility

Similar Project

License

This project is licensed under the MIT License - see the LICENSE file for details

About

Python client for Moss: A System for Detecting Software Similarity

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%