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

Use tempfile #1570

Merged
merged 40 commits into from
Aug 2, 2024
Merged

Use tempfile #1570

merged 40 commits into from
Aug 2, 2024

Conversation

samwaseda
Copy link
Member

@samwaseda samwaseda commented Jul 31, 2024

With this PR, pyiron uses the functionality of tempfile to create a temporary directory instead of taking care of it by itself (thanks @srmnitc for the idea!). This one makes an important step because it is going to be possible to use the same name as the project in pr.pack.

@samwaseda samwaseda added code_smell It's working, but something smells off minor add functionality in a backward compatible manner labels Jul 31, 2024
@samwaseda samwaseda changed the base branch from main to use_with_open July 31, 2024 13:49
@jan-janssen jan-janssen marked this pull request as draft July 31, 2024 14:11
Base automatically changed from use_with_open to main July 31, 2024 15:41
@samwaseda samwaseda marked this pull request as ready for review August 2, 2024 16:09
Copy link
Contributor

@pmrv pmrv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, sounds like it would already substantially easier to use with this.

For the future: In case of compress=True we might even skip the copy to the temp dir completely and just add directly to the tarfile. I would even argue that compress=False is not useful.

@samwaseda
Copy link
Member Author

For the future: In case of compress=True we might even skip the copy to the temp dir completely and just add directly to the tarfile. I would even argue that compress=False is not useful.

Yes! And I even did the change locally, but then realized that it makes it more difficult to read the changes so I dropped it for this PR, but I will do it over the course of next week.

@samwaseda samwaseda merged commit 9bd9d71 into main Aug 2, 2024
26 checks passed
@samwaseda samwaseda deleted the use_tempfile branch August 2, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code_smell It's working, but something smells off minor add functionality in a backward compatible manner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants