[FIX] VTK export appends .vtk#79
Open
sankalps0549 wants to merge 2 commits intomainfrom
Open
Conversation
* Introducing check_folder_path helper function for vtk export * Localise folder path message * copilot review fixes * Updating helper function name
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes VTK export path handling so PlotManager.export_to_vtk() treats the target as a folder export root (no .vtk suffix auto-appended), aligning behavior with Synergy and preventing path mismatches that break scripts/macros.
Changes:
- Added
prepare_folder_path()(and shared parent-dir creation helper) to validate folder-style export paths without modifying them. - Updated
PlotManager.export_to_vtk()to useprepare_folder_path()instead ofcheck_file_extension(). - Added/updated unit tests, logging message enum, translations, and changelog entry for the fix.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/core/test_helper.py | Adds tests for parent-dir creation and prepare_folder_path() behavior (including trailing separators and invalid types). |
| tests/api/unit_tests/test_unit_plot_manager.py | Extends PlotManager unit tests to ensure ExportToVTK receives the exact folder path passed in (no suffix appended). |
| src/moldflow/plot_manager.py | Switches VTK export path validation from file-extension logic to folder-path preparation. |
| src/moldflow/helper.py | Introduces _create_required_parent_directories() and prepare_folder_path(); refactors check_file_extension() to reuse shared logic. |
| src/moldflow/common.py | Adds a new LogMessage.CHECK_FOLDER_PATH entry for folder-path validation logging. |
| src/moldflow/locale/en-US/LC_MESSAGES/locale.en-US.po | Adds translation string for “Checking folder path {folder_path}”. |
| src/moldflow/locale/de-DE/LC_MESSAGES/locale.de-DE.po | Adds translation string for the new folder-path log message. |
| src/moldflow/locale/es-ES/LC_MESSAGES/locale.es-ES.po | Adds translation string for the new folder-path log message. |
| src/moldflow/locale/fr-FR/LC_MESSAGES/locale.fr-FR.po | Adds translation string for the new folder-path log message. |
| src/moldflow/locale/it-IT/LC_MESSAGES/locale.it-IT.po | Adds translation string for the new folder-path log message. |
| src/moldflow/locale/ja-JP/LC_MESSAGES/locale.ja-JP.po | Adds translation string for the new folder-path log message. |
| src/moldflow/locale/ko-KR/LC_MESSAGES/locale.ko-KR.po | Adds translation string for the new folder-path log message. |
| src/moldflow/locale/pt-PT/LC_MESSAGES/locale.pt-PT.po | Adds translation string for the new folder-path log message. |
| src/moldflow/locale/zh-CN/LC_MESSAGES/locale.zh-CN.po | Adds translation string for the new folder-path log message. |
| src/moldflow/locale/zh-TW/LC_MESSAGES/locale.zh-TW.po | Adds translation string for the new folder-path log message. |
| CHANGELOG.md | Documents the VTK export folder-path fix under v27.0.1 and updates release links. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
osinjoku
approved these changes
Apr 22, 2026
This file contains hidden or 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
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.
Cherry Picked commit from release branch to merge to main as well.