From dee13fa4f8006d5266c02d6290b0e98d31413a9f Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Wed, 7 Dec 2016 14:59:07 +0530 Subject: Refactor code server and python evaluator --- yaksh/settings.py | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'yaksh/settings.py') diff --git a/yaksh/settings.py b/yaksh/settings.py index 6383999..690ddb1 100644 --- a/yaksh/settings.py +++ b/yaksh/settings.py @@ -19,22 +19,28 @@ SERVER_TIMEOUT = 4 # host.org/foo/exam set URL_ROOT='/foo' URL_ROOT = '' +# code_evaluators = { +# "python": {"standardtestcase": "yaksh.python_assertion_evaluator.PythonAssertionEvaluator", +# "stdiobasedtestcase": "yaksh.python_stdio_evaluator.PythonStdioEvaluator" +# }, +# "c": {"standardtestcase": "yaksh.cpp_code_evaluator.CppCodeEvaluator", +# "stdiobasedtestcase": "yaksh.cpp_stdio_evaluator.CppStdioEvaluator" +# }, +# "cpp": {"standardtestcase": "yaksh.cpp_code_evaluator.CppCodeEvaluator", +# "stdiobasedtestcase": "yaksh.cpp_stdio_evaluator.CppStdioEvaluator" +# }, +# "java": {"standardtestcase": "yaksh.java_code_evaluator.JavaCodeEvaluator", +# "stdiobasedtestcase": "yaksh.java_stdio_evaluator.JavaStdioEvaluator"}, + +# "bash": {"standardtestcase": "yaksh.bash_code_evaluator.BashCodeEvaluator", +# "stdiobasedtestcase": "yaksh.bash_stdio_evaluator.BashStdioEvaluator" +# }, + +# "scilab": {"standardtestcase": "yaksh.scilab_code_evaluator.ScilabCodeEvaluator"}, +# } + code_evaluators = { "python": {"standardtestcase": "yaksh.python_assertion_evaluator.PythonAssertionEvaluator", "stdiobasedtestcase": "yaksh.python_stdio_evaluator.PythonStdioEvaluator" - }, - "c": {"standardtestcase": "yaksh.cpp_code_evaluator.CppCodeEvaluator", - "stdiobasedtestcase": "yaksh.cpp_stdio_evaluator.CppStdioEvaluator" - }, - "cpp": {"standardtestcase": "yaksh.cpp_code_evaluator.CppCodeEvaluator", - "stdiobasedtestcase": "yaksh.cpp_stdio_evaluator.CppStdioEvaluator" - }, - "java": {"standardtestcase": "yaksh.java_code_evaluator.JavaCodeEvaluator", - "stdiobasedtestcase": "yaksh.java_stdio_evaluator.JavaStdioEvaluator"}, - - "bash": {"standardtestcase": "yaksh.bash_code_evaluator.BashCodeEvaluator", - "stdiobasedtestcase": "yaksh.bash_stdio_evaluator.BashStdioEvaluator" - }, - - "scilab": {"standardtestcase": "yaksh.scilab_code_evaluator.ScilabCodeEvaluator"}, + } } -- cgit From f1da39aded67efa3da145851f0e9f687a3e434e5 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Mon, 19 Dec 2016 11:44:55 +0530 Subject: Change all evaluator structure and make sure eval test cases pass --- yaksh/settings.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'yaksh/settings.py') diff --git a/yaksh/settings.py b/yaksh/settings.py index 690ddb1..e18d310 100644 --- a/yaksh/settings.py +++ b/yaksh/settings.py @@ -42,5 +42,17 @@ URL_ROOT = '' code_evaluators = { "python": {"standardtestcase": "yaksh.python_assertion_evaluator.PythonAssertionEvaluator", "stdiobasedtestcase": "yaksh.python_stdio_evaluator.PythonStdioEvaluator" - } + }, + "c": {"standardtestcase": "yaksh.cpp_code_evaluator.CppCodeEvaluator", + "stdiobasedtestcase": "yaksh.cpp_stdio_evaluator.CppStdioEvaluator" + }, + "cpp": {"standardtestcase": "yaksh.cpp_code_evaluator.CppCodeEvaluator", + "stdiobasedtestcase": "yaksh.cpp_stdio_evaluator.CppStdioEvaluator" + }, + "java": {"standardtestcase": "yaksh.java_code_evaluator.JavaCodeEvaluator", + "stdiobasedtestcase": "yaksh.java_stdio_evaluator.JavaStdioEvaluator"}, + "bash": {"standardtestcase": "yaksh.bash_code_evaluator.BashCodeEvaluator", + "stdiobasedtestcase": "yaksh.bash_stdio_evaluator.BashStdioEvaluator" + }, + "scilab": {"standardtestcase": "yaksh.scilab_code_evaluator.ScilabCodeEvaluator"}, } -- cgit From bf5b4e7607bae0b81ceeb99e8bf5d750433e92e8 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Tue, 20 Dec 2016 12:42:44 +0530 Subject: Fix errors and rename resources - code_evaluator module and class renamed to grader - Test cases fixed - Comments removed - weight variable renamed to mark --- yaksh/settings.py | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) (limited to 'yaksh/settings.py') diff --git a/yaksh/settings.py b/yaksh/settings.py index e18d310..0e432cf 100644 --- a/yaksh/settings.py +++ b/yaksh/settings.py @@ -19,40 +19,20 @@ SERVER_TIMEOUT = 4 # host.org/foo/exam set URL_ROOT='/foo' URL_ROOT = '' -# code_evaluators = { -# "python": {"standardtestcase": "yaksh.python_assertion_evaluator.PythonAssertionEvaluator", -# "stdiobasedtestcase": "yaksh.python_stdio_evaluator.PythonStdioEvaluator" -# }, -# "c": {"standardtestcase": "yaksh.cpp_code_evaluator.CppCodeEvaluator", -# "stdiobasedtestcase": "yaksh.cpp_stdio_evaluator.CppStdioEvaluator" -# }, -# "cpp": {"standardtestcase": "yaksh.cpp_code_evaluator.CppCodeEvaluator", -# "stdiobasedtestcase": "yaksh.cpp_stdio_evaluator.CppStdioEvaluator" -# }, -# "java": {"standardtestcase": "yaksh.java_code_evaluator.JavaCodeEvaluator", -# "stdiobasedtestcase": "yaksh.java_stdio_evaluator.JavaStdioEvaluator"}, - -# "bash": {"standardtestcase": "yaksh.bash_code_evaluator.BashCodeEvaluator", -# "stdiobasedtestcase": "yaksh.bash_stdio_evaluator.BashStdioEvaluator" -# }, - -# "scilab": {"standardtestcase": "yaksh.scilab_code_evaluator.ScilabCodeEvaluator"}, -# } - code_evaluators = { "python": {"standardtestcase": "yaksh.python_assertion_evaluator.PythonAssertionEvaluator", - "stdiobasedtestcase": "yaksh.python_stdio_evaluator.PythonStdioEvaluator" + "stdiobasedtestcase": "yaksh.python_stdio_evaluator.PythonStdIOEvaluator" }, "c": {"standardtestcase": "yaksh.cpp_code_evaluator.CppCodeEvaluator", - "stdiobasedtestcase": "yaksh.cpp_stdio_evaluator.CppStdioEvaluator" + "stdiobasedtestcase": "yaksh.cpp_stdio_evaluator.CppStdIOEvaluator" }, "cpp": {"standardtestcase": "yaksh.cpp_code_evaluator.CppCodeEvaluator", - "stdiobasedtestcase": "yaksh.cpp_stdio_evaluator.CppStdioEvaluator" + "stdiobasedtestcase": "yaksh.cpp_stdio_evaluator.CppStdIOEvaluator" }, "java": {"standardtestcase": "yaksh.java_code_evaluator.JavaCodeEvaluator", - "stdiobasedtestcase": "yaksh.java_stdio_evaluator.JavaStdioEvaluator"}, + "stdiobasedtestcase": "yaksh.java_stdio_evaluator.JavaStdIOEvaluator"}, "bash": {"standardtestcase": "yaksh.bash_code_evaluator.BashCodeEvaluator", - "stdiobasedtestcase": "yaksh.bash_stdio_evaluator.BashStdioEvaluator" + "stdiobasedtestcase": "yaksh.bash_stdio_evaluator.BashStdIOEvaluator" }, "scilab": {"standardtestcase": "yaksh.scilab_code_evaluator.ScilabCodeEvaluator"}, } -- cgit