From a01cfeaeba9219415d765ce68f2aa2f2ec49f370 Mon Sep 17 00:00:00 2001 From: awccoppFC Date: Wed, 11 Feb 2026 11:18:04 -0500 Subject: [PATCH 1/2] removed validation check for write single file output surface output in paraview format --- flow360/component/simulation/outputs/outputs.py | 12 ------------ .../simulation/params/test_validators_output.py | 17 +++++++---------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/flow360/component/simulation/outputs/outputs.py b/flow360/component/simulation/outputs/outputs.py index 3be0a5b97..77cda0064 100644 --- a/flow360/component/simulation/outputs/outputs.py +++ b/flow360/component/simulation/outputs/outputs.py @@ -449,18 +449,6 @@ def validate_imported_surface_output_fields(self, param_info: ParamsValidationIn ) return self - @pd.model_validator(mode="after") - def ensure_write_single_file_supported(self): - """Ensure write_single_file is supported for chosen output format""" - if self.write_single_file: - if self.output_format == "paraview": - raise ValueError("write_single_file is only supported for Tecplot output format.") - if self.output_format == "both": - add_validation_warning( - "write_single_file is only supported for Tecplot output format. " - + "Paraview files will be still saved separately." - ) - return self class TimeAverageSurfaceOutput(SurfaceOutput): diff --git a/tests/simulation/params/test_validators_output.py b/tests/simulation/params/test_validators_output.py index 71af8ffef..a29545379 100644 --- a/tests/simulation/params/test_validators_output.py +++ b/tests/simulation/params/test_validators_output.py @@ -1526,16 +1526,13 @@ def test_force_distribution_output_requires_wall_bc(mock_validation_context): def test_surface_output_write_single_file_validator(): - with pytest.raises( - ValueError, - match=re.escape("write_single_file is only supported for Tecplot output format."), - ): - SurfaceOutput( - write_single_file=True, - entities=[Surface(name="noSlipWall")], - output_fields=["Cp"], - output_format="paraview", - ) + # write_single_file is now supported for all output formats + SurfaceOutput( + write_single_file=True, + entities=[Surface(name="noSlipWall")], + output_fields=["Cp"], + output_format="paraview", + ) SurfaceOutput( write_single_file=True, From b401ae657afbc3688b5752f379785aa45b6c4f91 Mon Sep 17 00:00:00 2001 From: awccoppFC Date: Wed, 11 Feb 2026 11:37:45 -0500 Subject: [PATCH 2/2] black formatting --- flow360/component/simulation/outputs/outputs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/flow360/component/simulation/outputs/outputs.py b/flow360/component/simulation/outputs/outputs.py index 77cda0064..3066775bb 100644 --- a/flow360/component/simulation/outputs/outputs.py +++ b/flow360/component/simulation/outputs/outputs.py @@ -450,7 +450,6 @@ def validate_imported_surface_output_fields(self, param_info: ParamsValidationIn return self - class TimeAverageSurfaceOutput(SurfaceOutput): """ :class:`TimeAverageSurfaceOutput` class for time average surface output settings.