[nodes] Fix GetParentFolder node#3122
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the GetParentFolder node to use the os module instead of pathlib.Path and adds logging for non-existent parent paths. The review feedback recommends retaining pathlib.Path as it is more modern and idiomatic. Furthermore, using os.path.dirname on a simple filename can result in an empty string, triggering a false warning when checking if the path exists, which is resolved by sticking to pathlib.Path.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3122 +/- ##
========================================
Coverage 85.38% 85.38%
========================================
Files 73 73
Lines 11406 11406
========================================
Hits 9739 9739
Misses 1667 1667 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
GetParentFolder node
Description
We don't necessarily want to check for original file existence.
Note
Example:
GetParentFolder("/my/path/to/images/image.%04d.exr")Will return an empty string because
image.%04d.exris a fileseqWe want to return
/my/path/to/imagesSo for now I just use the simple version, if we want to add more options for file checking we can add them later.