Deploy ====== Requirements ------------ - apache2 - python3-falcon - python3-ply - python3-psycopg2 - python3-termcolor - python3-waitress - swi-prolog-nox Settings -------- - copy files from codeq-web to webroot - set up reverse proxy for /svc/ to wsgi server ProxyPass /svc/ http://localhost:8082/ ProxyPassReverse /svc/ http://localhost:8082/ - set _path_prefix in server.problems - set DB settings in db Run --- - start prolog/runner/main.pl - start daemon.py - start wsgi_server.py Debugging ========= Some examples to run in a python interpreter: >>> import server >>> session = server.user_session.authenticate_and_create_session(, ) >>> session.get_problem_data('python', 'introduction', 'fahrenheit_to_celsius') >>> python = session.get_python() >>> python.test(231, 180, '''print('-17.7')''') >>> python.hint(231, 180, '''print('-17.7')''') >>> prolog = session.get_prolog() >>> prolog.test(231, 96, 'sister(X,Y):- parent(P,X), parent(P,Y), female(X).') >>> prolog.hint(231, 96, 'sister(X,Y):- parent(P,X), parent(P,Y), female(X).')