I2PC / scipion

Scipion is an image processing framework to obtain 3D models of macromolecular complexes using Electron Microscopy (3DEM)
http://scipion.i2pc.es
Other
76 stars 47 forks source link

Rename project protocol paths #1935

Closed Vilax closed 5 years ago

Vilax commented 5 years ago

When a project is renamed, the protocols keep the old path, and when they are relaunched they cannot find the path.

pconesa commented 5 years ago

More info: this happens with import volumes, because the import volume protocol has an attribute, outputVol, with an absolute path.

pconesa commented 5 years ago

also all volumes (Set) are imported with absolute paths.

delarosatrevin commented 5 years ago

Yep, maybe we could remove the absolute path in the output...I have sometimes thought if for volumes we activate the "Copy files" option to True by default. @azazellochg What do you think?

pconesa commented 5 years ago

I've fixed it just by making it relative, regardless copy or linking

delarosatrevin commented 5 years ago

Wait, wait. I still don't get it. If you are importing a volume outside the project, how the project renaming affect the abs link?

On Tue, Feb 26, 2019, 7:43 AM Pablo Conesa notifications@github.com wrote:

I've fixed it just by making it relative, regardless copy or linking

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/I2PC/scipion/issues/1935#issuecomment-467316308, or mute the thread https://github.com/notifications/unsubscribe-auth/AIDPWO1Blsdmvfi89QhTb3naaBj4TuKaks5vRNeHgaJpZM4bJWMV .

pconesa commented 5 years ago

Because the filename for the volume object stored was absolute.

pconesa commented 5 years ago

Imported volumes point files/links at import's extra folder

delarosatrevin commented 5 years ago

I still don't get it. I guess that if you import a volume from location: /x/y/z/volume.mrc The, in the extra folder, a link is created to /x/y/z/volume.mrc, independently of the location/name of the importing project. If you rename the project, I can't see how this affect the abs link.

azazellochg commented 5 years ago

@delarosatrevin yes, the link created in extra folder still works after renaming, the problem is here: https://github.com/I2PC/scipion/blob/release-2.0.0-fixes/pyworkflow/em/protocol/protocol_import/volumes.py#L152

azazellochg commented 5 years ago

In general, I agree that simply renaming the protocol should not affect its self-consistency.

pconesa commented 5 years ago

The problem will happen is we import from somewhere inside the project.... will that break the link?

delarosatrevin commented 5 years ago

Importing from the same project...usually means that there is some relevant output that we are not giving users the way to register it (via viewers, etc). If it is from another project, then it comes down as importing from an external folder, we don't have way to control if you rename a folder in the the filesystem after an import.

azazellochg commented 5 years ago

I have a big relion project, I'll try to rename it and see what breaks ;) All imports etc seems to work after renaming, except import volume

pconesa commented 5 years ago

I know, I was just thinking that if the "imports" from inside are linked relative...renaming will not break those links

delarosatrevin commented 5 years ago

Yes, imports are a bit troublesome...I remember we had discuss in the past and in some cases absolute seems better, but relative in other cases.