-
Notifications
You must be signed in to change notification settings - Fork 91
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
Fix safeCopy
to work on Linux
#1691
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… that gets run via os.system instead
More internal testing/processes are needed before this can be merged, but it's ready for a review, at least |
opotowsky
commented
Apr 22, 2024
Yeah, let's remove the possible infinite loop of "while True" here and set a time for... I don't know, 30 or 60 minutes. |
1. remove comment about historical use 2. implement a maxWaitTime of 30 min 3. explicitly test for windows v linux and throw warning otherwise And, src/dst needed to be treated with os.path.abspath to make os-indepedent.
opotowsky
commented
Apr 22, 2024
Co-authored-by: John Stilley <1831479+john-science@users.noreply.github.com>
jakehader
reviewed
Apr 23, 2024
Co-authored-by: John Stilley <1831479+john-science@users.noreply.github.com>
…into safecopy-update
john-science
approved these changes
Apr 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the change?
Replace
shutil.copyfile
andshutil.copymode
with acopy
(windows) orcp
(linux) command. This accomplishes the same thing as before (file copy with metadata).We are NOT taking away the fact that
safeCopy
overridesshutil.copy
in this PR, because there are significant downstream impacts and we need to check in with other ARMI users first. That is being tracked in the ticket #1690.Why is the change being made?
Depending on how permissions are set up, this doesn't work on all linux systems.
Checklist
doc
folder.pyproject.toml
.