Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Q: jobe server - optional or required? #1193

Closed
yarikoptic opened this issue Jan 16, 2019 · 5 comments
Closed

Q: jobe server - optional or required? #1193

yarikoptic opened this issue Jan 16, 2019 · 5 comments

Comments

@yarikoptic
Copy link
Contributor

While building a book in the docker container (#1178) I noted references to some external service

sphinx-build -b html -d ././build/fopp/doctrees -c . -Adefault_ac_lang=python -Arunestone_version=3.3.0 -Abasecourse=fopp -Adownloads_enabled=false -Acourse_id=fopp -Aproxy_uri_files=/jobe/index.php/restapi/files/ -Apython3=true -Adburl=postgresql://runestone:secretshhhhh@localhost/runestone -Abuild_info=1.0.13 -Aappname=runestone -Aloglevel=10 -Aproxy_uri_runs=/jobe/index.php/restapi/runs/ -Alogin_required=true -Acourse_url= -Ause_services=true -Aenable_chatcodes=false -Ajobe_server=http://jobe2.cosc.canterbury.ac.nz ./_sources ./build/fopp

What is its purpose and either it is something required or could be "configured out" or ...?

in the "code" it seems to be referenced in both server and components:

(git)hopa:~/doc/classes/psyc161-3rdparty/runestone/RunestoneServer[enh-dockerfile]git
$> git grep jobe   
controllers/proxy.py:def jobeRun():
controllers/proxy.py:    logger.debug("got a jobe request %s", request.vars.run_spec)
controllers/proxy.py:    req.headers['X-API-KEY'] = settings.jobe_key
controllers/proxy.py:    uri = '/jobe/index.php/restapi/runs/'
controllers/proxy.py:    url = settings.jobe_server + uri
controllers/proxy.py:def jobePushFile():
controllers/proxy.py:    logger.debug("got a jobe request %s", request.vars.run_spec)
controllers/proxy.py:    req.headers['X-API-KEY'] = settings.jobe_key
controllers/proxy.py:    uri = '/jobe/index.php/restapi/files/'+request.args[0]
controllers/proxy.py:    url = settings.jobe_server + uri
controllers/proxy.py:def jobeCheckFile():
controllers/proxy.py:    logger.debug("got a jobe request %s", request.vars.run_spec)
controllers/proxy.py:    req.headers['X-API-KEY'] = settings.jobe_key
controllers/proxy.py:    uri = '/jobe/index.php/restapi/files/'+request.args[0]
controllers/proxy.py:    url = settings.jobe_server + uri
tests/test_book/_templates/plugin_layouts/sphinx_bootstrap/layout.html:  eBookConfig.jobehost = '{{jobe_server}}';
tests/test_book/pavement.py:                       'jobe_server': 'http://jobe2.cosc.canterbury.ac.nz',
tests/test_book/pavement.py:                       'proxy_uri_runs': '/jobe/index.php/restapi/runs/',
tests/test_book/pavement.py:                       'proxy_uri_files': '/jobe/index.php/restapi/files/',

$> cd ../RunestoneComponents 

$> git grep jobe            
runestone/activecode/js/activecode.js:    this.JOBE_SERVER = eBookConfig.jobehost || eBookConfig.host;
runestone/activecode/js/activecode.js:    this.resource = eBookConfig.proxyuri_runs ||  '/runestone/proxy/jobeRun';
runestone/activecode/js/activecode.js:    this.jobePutFiles = eBookConfig.proxyuri_files || '/runestone/proxy/jobePushFile/';
runestone/activecode/js/activecode.js:    this.jobeCheckFiles = eBookConfig.proxyuri_files || '/runestone/proxy/jobeCheckFile/';
runestone/activecode/js/activecode.js:    var resource = this.jobeCheckFiles + file_id;
runestone/activecode/js/activecode.js:    var resource = this.jobePutFiles + file_id;
runestone/activecode/test/_templates/plugin_layouts/sphinx_bootstrap/layout.html:  eBookConfig.jobehost = '{{jobe_server}}';
runestone/activecode/test/pavement.py:                       'jobe_server': 'http://jobe2.cosc.canterbury.ac.nz',
runestone/activecode/test/pavement.py:                       'proxy_uri_runs': '/jobe/index.php/restapi/runs/',
runestone/activecode/test/pavement.py:                       'proxy_uri_files': '/jobe/index.php/restapi/files/'
runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/layout.html:  eBookConfig.jobehost = '{{jobe_server}}';
runestone/common/project_template/pavement.tmpl:                       'jobe_server': 'http://jobe2.cosc.canterbury.ac.nz',
runestone/common/project_template/pavement.tmpl:                       'proxy_uri_runs': '/jobe/index.php/restapi/runs/',
runestone/common/project_template/pavement.tmpl:                       'proxy_uri_files': '/jobe/index.php/restapi/files/',
runestone/common/project_template/pavement.tmpl:    del options.build.template_args['jobe_server']
@bjones1
Copy link
Contributor

bjones1 commented Jan 16, 2019

It's used to run student code in a sandbox. See https://github.com/trampgeek/jobe.

@yarikoptic
Copy link
Contributor Author

Thanks for the pointer! sweet.
In my case it is all Python AFAIK and I thought that the Skulpt is used through out for all python activecode.
How do I see which code pieces require/use jobe? or may be if it is all Python I could just disable jobe for my instance?

@bjones1
Copy link
Contributor

bjones1 commented Jan 16, 2019

I don't know -- I don't use activecode in my book. Take a look through https://github.com/RunestoneInteractive/RunestoneComponents/blob/master/runestone/activecode/js/activecode.js.

@bnmnetp
Copy link
Member

bnmnetp commented Jan 18, 2019

If you set the language to c, Cupp, or java active code will use the jobe server. You can also force it to use python in a sandbox but neither fopp or thinkcspy do so.

@yarikoptic
Copy link
Contributor Author

Thank you @bnmnetp and @bjones1 !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants