dummy experiment

52 views
Skip to first unread message

Johanna Roussel

unread,
Jun 13, 2016, 4:07:35 AM6/13/16
to weblabdeusto
Hey!

Where can I find the dummy experiment server which is used by the dummy experiment?
I found some dummy.py files in some directories ("weblebdeusto\server\..") - but if I change the source code (e.g. the "Received command"-String) nothing changes after a rerun of weblab-admin.

Best,
Hanna

Pablo Orduña

unread,
Jun 13, 2016, 4:58:19 AM6/13/16
to weblab...@googlegroups.com

Hi,

The dummy server that comes by default is in weblabdeusto/server/src/experiments/dummy.py. However, that's where the source code is. If you changed it you would need to run "python setup.py install" again so that file would be copied to your virtualenv and then restart the WebLab-Deusto process to apply changes.

A more practical approach is to copy that file outside (to anywhere in your computer) and point it out in the .yml file. For example, if you copy the file as "mydummy.py" in "C:\Users\Johanna\mytests\mydummy.py", and then you add it that directory to the PYTHONPATH (either by typing "set PYTHONPATH=%PYTHONPATH%;C:\Users\Johanna\mytests" each time before running weblab-admin; or by putting that environment variable in your computer once as you probably did when installing Python), then you can change the configuration.yml so you put "class: mydummy.DummyExperiment" and restart the WebLab-Deusto process. This is explained here:

http://weblabdeusto.readthedocs.io/en/latest/remote_lab_deployment.html#weblab-deusto-python-server

Take into account that changing a Python file requires you to restart that process to apply changes. If you have the experiment server in the same process as the core server, you would be restarting everything for every little change. In the case you expect many small changes, it might be more convenient to deploy it as an XMLRPC experiment so you only have to restart that experiment process. You can see how here:

http://weblabdeusto.readthedocs.io/en/latest/remote_lab_deployment.html#non-python-managed-servers-xml-rpc-based

(Oh, and btw, you might notice that in the documentation it only says "weblab-admin" instead of "weblab-admin.py". Before June 3, in Windows it had to be "weblab-admin.py" and in Linux/Mac either "weblab-admin.py" or "weblab-admin". Now both options work in all the Operating Systems, so in the docs we only use "weblab-admin" while "weblab-admin.py" also works everywhere)

Best,
--
Pablo Orduña ( http://morelab.deusto.es/p/pablo-orduna/ )
MORElab - Envisioning Future Internet (http://morelab.deusto.es)
WebLab-Deusto - (http://weblab.deusto.es)

--
You received this message because you are subscribed to the Google Groups "weblabdeusto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weblabdeusto...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Johanna Roussel

unread,
Jun 13, 2016, 6:15:51 AM6/13/16
to weblabdeusto
Hi,

ah thanks. "python setup.py install" was the missing information I needed.

I already saw last week in the commits, that weblab-admin without .py should work now on Windows. I tried it this morning and it worked :)

Best,
Hanna

Pablo Orduña

unread,
Jun 13, 2016, 7:39:53 AM6/13/16
to weblab...@googlegroups.com

Cool!

Regarding the dummy.py file, just remember to do "git checkout server/src/dummy.py" next time (but watch out, because that will revert your changes!) you are going to upgrade WebLab-Deusto. Otherwise git will say that it will not upgrade since there are local changes.

Best,
--
Pablo Orduña ( http://morelab.deusto.es/p/pablo-orduna/ )
MORElab - Envisioning Future Internet (http://morelab.deusto.es)
WebLab-Deusto - (http://weblab.deusto.es)

Reply all
Reply to author
Forward
0 new messages