Closed tischi closed 3 years ago
Maybe just a bug in "/g/emcf/pape/mobie-test-projects/mobie_crop"? In my code I always append "/data"...
I have the feeling that on github the data MUST be in a subfolder called
data
but for local storage we do not require this?!
I don't think we should require the data
subfolder anywhere.
I have adapted the MoBIE source code at some point so that both are supported, see https://github.com/mobie/mobie-viewer-fiji/commit/9abba4d59517a67950cc2621b6c5fcf66e9e3822.
I am not sure if this works for all possible storages. (This was necessary to support opening projects only from s3, where we don't always follow the /data
pattern and where changing this after uploading would be very expensive.)
I see! I did not migrate this part of the code to MoBIE2 yet. I will do.
Do you think the default should be that the data folder exists (on github it seems to always be there) or that it does not exist?
I think I would first check if project.json
can be found at the given location and the check if it's in /data/project.json
. Something like this (bad python pseudocode...):
try:
assert exists(project_location + "/project.json")
except:
project_location += "/data"
assert exists(project_location + "/project.json")
Ok, that's what I did more or less. Currently I assume however that table, image and project data locations are consistent in this respect... You think that's OK when opening from different locations in the advanced mode?
Currently I assume however that table, image and project data locations are consistent in this respect... You think that's OK when opening from different locations in the advanced mode?
I think we shouldn't assume that it's consistent, because this often diverges on github and s3.
Can't you just make a function modify_project_location
and call it for table, image and project location?
Yes, I can :)
@constantinpape @K-Meech
I have the feeling that on github the data MUST be in a subfolder called
data
but for local storage we do not require this?!For example: /g/emcf/pape/mobie-test-projects/mobie_crop