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

Outputs Update #2 - Run Gudrun in Temporary Directory #460

Merged
merged 173 commits into from
Jan 25, 2024
Merged

Conversation

rhinoella
Copy link
Contributor

@rhinoella rhinoella commented Oct 11, 2023

Stage 2 of Outputs Update #457, builds off of #458.

This PR changes the way gudrun_dcs is run, by running it in a temporary directory, so all the files are outputted there, and then organising and copying the outputs back in the user's permanent directory.

This approach has three advantages:

  • Removes the need for dangerous file-management operations (folder/file deletions) in the permanent directory
  • If the program crashes or there is an issue with the run there will be no unorganised files to manage
  • Much more control on how to present outputs to users and choosing save locations

Changes

  • Gudrun and Purge DCS are run in a temporary directory
  • The running of the process is done using a QThread and a worker instead of a QProcess as this allows for the use of a context manager
  • Purge dialog is changed - no longer asks to run with default parameters (the user can just click 'OK' for this)

Next Steps:

  • Update Batch Processing to utilise the new system- remove dcs() function
  • Deploy GudPy class to handle all the GudPy processes (remove responsibility from GudrunFile class)
  • Add new functionaity to headless mode
  • Import project from project folder

@rhinoella rhinoella changed the base branch from develop to code-cleanup October 11, 2023 15:12
@rhinoella rhinoella self-assigned this Jan 24, 2024
@rhinoella rhinoella merged commit 2202d58 into develop Jan 25, 2024
@rhinoella rhinoella deleted the outputs-fix-2 branch January 25, 2024 12:47
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

Successfully merging this pull request may close these issues.

None yet

2 participants