summaryrefslogtreecommitdiff
path: root/yaksh/settings.py
blob: f687d5145f00a09e32aa1d69d42ae2d07101aef2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
"""
settings for yaksh app.
"""

from decouple import config

# The number of code server processes to run..
N_CODE_SERVERS = config('N_CODE_SERVERS', default=5, cast=int)

# The server pool port.  This is the server which returns available server
# ports so as to minimize load.  This is some random number where no other
# service is running.  It should be > 1024 and less < 65535 though.
SERVER_POOL_PORT = config('SERVER_POOL_PORT', default=55555, cast=int)

# Server host name
SERVER_HOST_NAME = config('SERVER_HOST_NAME', default='http://localhost')

# Timeout for the code to run in seconds.  This is an integer!
SERVER_TIMEOUT = config('SERVER_TIMEOUT', default=6, cast=int)

# The root of the URL, for example you might be in the situation where you
# are not hosted as host.org/exam/  but as host.org/foo/exam/ for whatever
# reason set this to the root you have to serve at.  In the above example
# 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",
      "hooktestcase": "yaksh.hook_evaluator.HookEvaluator"
      },
    "c": {"standardtestcase": "yaksh.cpp_code_evaluator.CppCodeEvaluator",
          "stdiobasedtestcase": "yaksh.cpp_stdio_evaluator.CppStdIOEvaluator",
          "hooktestcase": "yaksh.hook_evaluator.HookEvaluator"
          },
    "cpp": {"standardtestcase": "yaksh.cpp_code_evaluator.CppCodeEvaluator",
            "stdiobasedtestcase":
            "yaksh.cpp_stdio_evaluator.CppStdIOEvaluator",
            "hooktestcase": "yaksh.hook_evaluator.HookEvaluator"
            },
    "java": {"standardtestcase": "yaksh.java_code_evaluator.JavaCodeEvaluator",
             "stdiobasedtestcase":
             "yaksh.java_stdio_evaluator.JavaStdIOEvaluator",
             "hooktestcase": "yaksh.hook_evaluator.HookEvaluator"
             },
    "bash": {"standardtestcase": "yaksh.bash_code_evaluator.BashCodeEvaluator",
             "stdiobasedtestcase":
             "yaksh.bash_stdio_evaluator.BashStdIOEvaluator",
             "hooktestcase": "yaksh.hook_evaluator.HookEvaluator"
             },
    "scilab": {
        "standardtestcase": "yaksh.scilab_code_evaluator.ScilabCodeEvaluator",
        "hooktestcase": "yaksh.hook_evaluator.HookEvaluator"
        },
}