-
Notifications
You must be signed in to change notification settings - Fork 0
Create a unique folder when not specified by the user #55
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #55 +/- ##
==========================================
+ Coverage 95.11% 95.14% +0.02%
==========================================
Files 13 13
Lines 532 535 +3
==========================================
+ Hits 506 509 +3
Misses 26 26 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds automatic unique directory generation functionality to the DirectoryObject
class. When no specific directory is provided or when explicitly requested, it generates a unique folder name using UUID to avoid conflicts.
- Adds optional
generate_unique_directory
parameter to control unique directory creation - Implements automatic unique directory naming with "data_" prefix and UUID hex suffix
- Updates constructor to handle unique directory generation logic
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
pyiron_snippets/files.py | Adds UUID import, new parameter, documentation, and unique directory generation logic |
tests/unit/test_files.py | Adds test case to verify unique directory creation with expected naming pattern |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
I thought it might be neat to automatically generate a working directory:
Output:
PosixPath('data_9d2d9cc5da624d4da95455a12c8cb490')