Issue938

Title recommend using Python virtual environments for experiments
Priority wish Status resolved
Superseder Nosy List jendrik, malte, silvan, thomas
Assigned To jendrik Keywords
Optional summary

Created on 2019-11-21.20:21:52 by jendrik, last changed by jendrik.

Messages
msg9040 (view) Author: jendrik Date: 2019-11-22.20:07:47
OK, I went ahead and merged this. Thanks for the comments, guys!
msg9039 (view) Author: malte Date: 2019-11-22.18:45:02
I like the direction of this, and I think it's best if you agree on the details between yourselves. In other words, looks good to me.
msg9038 (view) Author: thomas Date: 2019-11-22.15:36:01
"Ah, now I understand your comment from msg9034. I don't think we usually maintain the old experiment scripts."

I just saw that you changed the "old experiment script" from issue899 by adjusting the print statement and thought your intention is to update those scripts that are mentioned as a reference for some lab feature in the README file (issue 899 is one of them, as is issue 735) because those are the scripts people base their experiments on. Never mind if this was not your intention. 

If it is likely that a lab script doesn't work anymore, I don't think it should be mentioned as a reference in the README, though.
msg9037 (view) Author: jendrik Date: 2019-11-22.15:26:48
Ah, now I understand your comment from msg9034. I don't think we usually maintain the old experiment scripts.

Regarding msg9036: these commands are for creating the virtual environment. So the second command only works if "python" points to a python3 interpreter, for example, if you're already in a virtual environment. Python 2 doesn't have the venv module.
msg9036 (view) Author: thomas Date: 2019-11-22.15:21:13
So this

python3 -m venv --prompt=issue899 venv

and this

python -m venv --prompt=issue899 venv

does exactly the same thing?
msg9035 (view) Author: jendrik Date: 2019-11-22.15:16:33
One of the benefits of virtual environments is that "python" points to the correct interpreter anyway.
msg9034 (view) Author: thomas Date: 2019-11-22.15:13:02
You could think about changing to python 3 in all experiment scripts that are mentioned in the README (like you did in issue899/common_setup.py). For instance, custom_parser.py in issue 735 still has a python 2 print in it (I didn't look any further).
msg9033 (view) Author: silvan Date: 2019-11-22.14:56:57
Looks fine for me.
msg9032 (view) Author: silvan Date: 2019-11-22.11:09:20
I left a comment.
msg9031 (view) Author: jendrik Date: 2019-11-21.20:43:19
Pull request: https://bitbucket.org/jendrikseipp/downward/pull-requests/145
msg9030 (view) Author: jendrik Date: 2019-11-21.20:21:52
Python virtual environments allow us to separate the Lab (and Matplotlib) versions for different experiments, which makes it easier to reproduce experiments later. I'd like to include instructions for this in the experiments/README file.
History
Date User Action Args
2019-11-22 20:07:47jendriksetstatus: reviewing -> resolved
messages: + msg9040
2019-11-22 18:45:02maltesetmessages: + msg9039
2019-11-22 15:36:01thomassetmessages: + msg9038
2019-11-22 15:26:48jendriksetmessages: + msg9037
2019-11-22 15:21:13thomassetmessages: + msg9036
2019-11-22 15:16:33jendriksetmessages: + msg9035
2019-11-22 15:13:02thomassetmessages: + msg9034
2019-11-22 14:56:57silvansetmessages: + msg9033
2019-11-22 11:09:20silvansetnosy: + silvan
messages: + msg9032
2019-11-21 21:02:37thomassetnosy: + thomas
2019-11-21 20:43:19jendriksetstatus: unread -> reviewing
messages: + msg9031
2019-11-21 20:21:52jendrikcreate