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

Scratch folder for temporary data moves when using profiles #112

Merged
merged 4 commits into from
Nov 21, 2024

Conversation

MrHedmad
Copy link
Owner

@MrHedmad MrHedmad commented Nov 21, 2024

Currently, the logic for applying profiles is as follows:

  • Get which files have to be moved;
  • Move originals to **/*.original;
  • Move temporary to originals;
  • Run the workflow;
  • Revert the profile.

This PR changes this to:

  • Get which files have to be moved;
  • Move originals to .kerblam/scratch/*.<random salt>;
  • Move temporary to originals;
  • Run the workflow;
  • Revert the profile.

This has two benefits:

  • First, we can fix Mask files in profiles #76, by simply omitting to move the temporary files to the originals;
  • Second, it makes sense that the original files would "disappear" when running a profile: you might list all files in a folder, and in the current implementation you would find the *.original still in the directory, which you might not be expecting.

While the second benefit might not be too useful, it might still be a desirable functionality.

TODO

Before merging, tick all of these boxes:

  • cargo test -- --include-ignored passes without errors or warnings.
  • The CHANGELOG.md has been updated to reflect these changes.
  • Documentation is updated that reflect these changes, or this PR changes nothing that is reflected in the docs.
  • @all-contributors is made aware of this PR, or I am already in the all contributors list.

@MrHedmad
Copy link
Owner Author

This now both fixes #76 and implements the logical changes, all in one package.

@MrHedmad MrHedmad merged commit 1a77dcf into main Nov 21, 2024
6 checks passed
@MrHedmad MrHedmad deleted the mask_files branch November 21, 2024 15:41
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.

Mask files in profiles
1 participant