SyneRBI / SIRF-Exercises

SIRF Training and demonstration material
http://www.ccpsynerbi.ac.uk
Apache License 2.0
18 stars 21 forks source link

exercises_data_path fails after doing download_data_path.sh without options #116

Closed KrisThielemans closed 3 years ago

KrisThielemans commented 3 years ago

I've executed download_data.sh but nevertheless get

RuntimeError: Exercises data weren't found. Please run download_data.sh in the scripts directory (use its -h option to get help)

I have seen this in the past but then it disappeared. No clue what I did to make it work. Anyone ?

KrisThielemans commented 3 years ago

ok, the problem is that without options, it doesn't download data, hence doesn't create the SIRF-Exercises directory, hence fails to read it. Best to make the directory.

work-around, actually download something by adding -p or -m

ashgillman commented 3 years ago

Ah - makes sense. It seems, in some ways, still nice to have an error if the user accidentally didn't download the data by forgetting to add a flag.

This is only an issues I guess because working_folder is inside the exercises data path (otherwise you could still run notebooks that don't need the data). So an alternative would be to have working_folder separate and then the error is only raised when you try to load the actual exercises data.

I'm genuinely not sure which option would be better

KrisThielemans commented 3 years ago

At this point in time, I'd rather keep the change very small. I suggest to create the "root" folder at the end of download script (mkdir -p). People will still get an error when doing exercise_data_path('PET') as that folder doesn't exist unless they download the data.