Skip to content

[nodes] Fix GetParentFolder node#3122

Merged
cbentejac merged 1 commit into
developfrom
bugfix/fix_get_parent_dir_node
Jun 5, 2026
Merged

[nodes] Fix GetParentFolder node#3122
cbentejac merged 1 commit into
developfrom
bugfix/fix_get_parent_dir_node

Conversation

@Alxiice
Copy link
Copy Markdown
Contributor

@Alxiice Alxiice commented Jun 5, 2026

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.exr is a fileseq
We want to return /my/path/to/images

So for now I just use the simple version, if we want to add more options for file checking we can add them later.

@Alxiice Alxiice self-assigned this Jun 5, 2026
@Alxiice Alxiice requested a review from cbentejac June 5, 2026 09:56
@Alxiice Alxiice added bug for actual bugs (unsure? use type:question) bugfix and removed bug for actual bugs (unsure? use type:question) labels Jun 5, 2026
@Alxiice Alxiice added this to the Meshroom 2026.1.0 milestone Jun 5, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread meshroom/nodes/general/GetParentFolder.py
Comment thread meshroom/nodes/general/GetParentFolder.py
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.38%. Comparing base (6f4fdcd) to head (8775c79).
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cbentejac cbentejac changed the title [bug] Fix GetParentFolder node [nodes] Fix GetParentFolder node Jun 5, 2026
@cbentejac cbentejac changed the title [nodes] Fix GetParentFolder node [nodes] Fix GetParentFolder node Jun 5, 2026
@cbentejac cbentejac merged commit a2bb624 into develop Jun 5, 2026
8 checks passed
@cbentejac cbentejac deleted the bugfix/fix_get_parent_dir_node branch June 5, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants