Skip to content

Conversation

@piotrkluba
Copy link
Collaborator

@piotrkluba piotrkluba commented Jan 30, 2026

ticket: https://flow360.atlassian.net/browse/FXC-5244


Note

Low Risk
Small, localized validation change that only affects parameter construction/validation for SurfaceOutput and is covered by new/updated tests.

Overview
Adds an after model validator on SurfaceOutput to enforce that write_single_file is only valid for Tecplot output: it now raises for output_format="paraview" and warns (but allows) for output_format="both".

Extends test coverage with a new validator test and updates several existing fixtures/tests to explicitly set output_format="tecplot" when write_single_file=True.

Written by Cursor Bugbot for commit 195e6b9. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

if self.output_format == "paraview":
raise ValueError("write_single_file is only supported for Tecplot output format.")
if self.output_format == "both":
log.warning(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use this for emitting validaiton warning: add_validation_warning() see in flow360/component/simulation/validation/validation_context.py

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is hotfixed to 25.7, i will change the current logging type to this one when reviewing hotfixes for 25.8 and main as add_validation_warning() is not yet available in 25.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants