Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up intermediate protocol files #193

Closed
azazellochg opened this issue Dec 29, 2020 · 4 comments
Closed

Clean up intermediate protocol files #193

azazellochg opened this issue Dec 29, 2020 · 4 comments
Assignees

Comments

@azazellochg
Copy link
Member

This is from I2PC/scipion#2078
This has been requested many times. Personally I don't see a general implementation (JM had some ideas, I'm keen to hear them). As most requests come from relion users, I could make a script to do gentle/harsh clean as done by relion gui and put it into pyworkflow/project/scripts

@pconesa what do you think?

@pconesa
Copy link
Contributor

pconesa commented Dec 29, 2020

I think clean up logic resides exclusively to the protocol itself, unless we complicate pyworkflow to understand output files from temporary ones. I'd not go down this way. Therefore the protocol knows what to clean or not.

I see 2 ways, well 3 now with your suggestion:

  1. A script to clean up as @azazellochg suggested
  2. Each of the protocols, either at create output step or in a specific step make the clean up
  3. Pyworkflow, when a protocol finishes, call something like Protocol.cleanFiles, that is empty but each protocol can implement.

2 and 3 are quite similar, maybe 3 more explicit and both does not require the user to manually do the clean.

Now, this works for me, assuming iteration files are in general, not useful once the protocol finishes. The clean up will happens always.

Additionally we can deactivate the cleanup if SCIPION_DEBUG_NOCLEAN is active..this goes better centralised in option 3.

So, I'd go for 3.

@azazellochg
Copy link
Member Author

azazellochg commented Dec 29, 2020

The clean up will happens always.

That is exactly the problem I see with any general solution. As a user, I do not want to erase any relion output files by default unless I really need to (space issues, project complete etc.). Removing all intermediate iteration files by default will make all iteration viewers useless or broken. Also, I believe Scipion should keep all the metadata / logs etc of underlying programs since this is one of the Scipion's basic goals.

That's why I'm suggesting a script rather than "by default" solution.

@azazellochg
Copy link
Member Author

Looks like 8720c30 has silently addressed this :)

@pconesa
Copy link
Contributor

pconesa commented May 14, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants