Package: markingpy
markingpyTool for grading a directory of python submissions using a scheme file containing exercises. The grader supports multiple test cases and analyses code style using PyLint.Read the full documentation athttps://markingpy.readthedocs.io.InstallationMarkingpy should be installed using the pip installation tool.pipinstallmarkingpyExample usageThere are two steps to using markingpy. First is to create the marking scheme file, which should be of the following form:frommarkingpyimportmark_scheme,exercise,PyLintChecker# If you want to use timing tests, usefrommarkingpyimportTimingCase# Initialise mark scheme configuration.ms=mark_scheme(linter=PyLintChecker(),# add a linter to the marking processsubmissions_path='submissions'# Directory to search for submissions)@exercise(name='Exercise 1',descr='Short description for feedback')defex_1_function(arg1,arg2):"""Model solution for exercise 1."""pass# Now add the call test componentsex_1_function.add_test_call((1,1),marks=1)ex_1_function.add_test.call((1,2),marks=1)# Add a timing test using the followingcases=[TimingCase((1,1),{},1),TimingCase((10,10),{},3),]ex_1_function.timing_test(cases,marks=2)@ex_1_function.testdefcustom_test():"""Define a custom test. This test determines whether thesubmission function does any type checking duringexecution. The test is passed if the function raisesa TypeError.Custom functions should return True or False for successor failure, respectively."""# Use the function ex_1_function in the test# this will be replaced by the submission function# during testingtry:out=ex_1_function(1.0,2.0)exceptTypeError:returnTruereturnFalseOnce the marking scheme has been created, inscheme.pyor similar, use the command line tool to begin grading submissions:markingy scheme.py runThe results and feedback will be generated and stored in a database, and can be retrieved using the commandmarkingpy scheme.py dump directorywhich will dump feedback files (.txt) intodirectoryfor each submission.Development setupClone the repository and runmake install. Markingpy usespipenvto handle its dependencies.Additional DisclaimerThis is my first Python package that I have "released" (i.e. put on PyPI), and I would be grateful for any feedback and constructive criticisms. Contributions are certainly welcome in all forms; see below.ContributingFork it (https://github.com/inakleinbottle/markingpy/fork)Create your feature branch (git checkout -b feature/name)Commit your changes (`git commit -m 'Add some feature')Push to the branch (git push origin feature/name)Create a new Pull Request.Release History1.0.0Reworked grader system. Tests can now be run in separate processes to provide better isolation.Reworked command line interface.Reorganised and improved test suite.Greatly simplified marking scheme creation and exercise association.0.2.0Added support to tests on arbitrary objects and their methods.Various improvements to the code base. Added descriptor support
for test classes and exercise classes.Expanded the documentation.Implemented finder system for locating submissions, which currently
supports loading submissions from directory (as before) and SQLite
databases. Planned support for server loading.0.1.0First releaseMetaSam Morley -sam@inakleinbottle.com-https://inakelinbottle.comDistributed under the GPLV3 license. SeeLICENSEfor more information.