From a2aeafc211002ad14c642f88691a372d3936e504 Mon Sep 17 00:00:00 2001 From: andrzej-krupka Date: Thu, 26 Mar 2026 11:05:10 +0000 Subject: [PATCH 1/3] feat(client): add use_nextflow_pipelines flag to geometry creation Expose the useNextflowPipelines flag in the Python client so users can opt into Nextflow-based geometry processing. The flag is passed through Geometry.from_file() -> GeometryDraft -> NewGeometryRequest -> POST /v2/geometries request body. Defaults to False -- no behavior change for existing users. Co-Authored-By: Claude Opus 4.6 (1M context) --- flow360/cloud/flow360_requests.py | 5 +++++ flow360/component/geometry.py | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/flow360/cloud/flow360_requests.py b/flow360/cloud/flow360_requests.py index 64909fcde..fe30812d5 100644 --- a/flow360/cloud/flow360_requests.py +++ b/flow360/cloud/flow360_requests.py @@ -118,6 +118,11 @@ class NewGeometryRequest(Flow360RequestsV2): alias="lengthUnit", description="project length unit" ) description: str = pd_v2.Field(default="", description="project description") + use_nextflow_pipelines: bool = pd_v2.Field( + default=False, + alias="useNextflowPipelines", + description="Route geometry processing through Nextflow pipeline instead of legacy system", + ) class NewSurfaceMeshRequestV2(Flow360RequestsV2): diff --git a/flow360/component/geometry.py b/flow360/component/geometry.py index fe4c6bf10..a4ac54e30 100644 --- a/flow360/component/geometry.py +++ b/flow360/component/geometry.py @@ -107,6 +107,7 @@ def __init__( length_unit: LengthUnitType = "m", tags: List[str] = None, folder: Optional[Folder] = None, + use_nextflow_pipelines: bool = False, ): """ Initialize a GeometryDraft with common attributes. @@ -138,6 +139,7 @@ def __init__( self.length_unit = length_unit self.solver_version = solver_version self.folder = folder + self.use_nextflow_pipelines = use_nextflow_pipelines # pylint: disable=fixme # TODO: create a DependableResourceDraft for GeometryDraft and SurfaceMeshDraft @@ -241,6 +243,7 @@ def _create_project_root_resource( parent_folder_id=self.folder.id if self.folder else "ROOT.FLOW360", length_unit=self.length_unit, description=description, + use_nextflow_pipelines=self.use_nextflow_pipelines, ) resp = RestApi(GeometryInterface.endpoint).post(req.dict()) @@ -473,10 +476,16 @@ def from_file( length_unit: LengthUnitType = "m", tags: List[str] = None, folder: Optional[Folder] = None, + use_nextflow_pipelines: bool = False, ) -> GeometryDraft: - # For type hint only but proper fix is to fully abstract the Draft class too. - return super().from_file( - file_names, project_name, solver_version, length_unit, tags, folder=folder + return GeometryDraft( + file_names=file_names, + project_name=project_name, + solver_version=solver_version, + length_unit=length_unit, + tags=tags, + folder=folder, + use_nextflow_pipelines=use_nextflow_pipelines, ) @classmethod From 68d2d61029778e522fd2037ab8dc496d1079e935 Mon Sep 17 00:00:00 2001 From: andrzej-krupka Date: Fri, 27 Mar 2026 16:35:53 +0000 Subject: [PATCH 2/3] Fix naming --- flow360/cloud/flow360_requests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flow360/cloud/flow360_requests.py b/flow360/cloud/flow360_requests.py index fe30812d5..c3c0fc0a0 100644 --- a/flow360/cloud/flow360_requests.py +++ b/flow360/cloud/flow360_requests.py @@ -118,9 +118,9 @@ class NewGeometryRequest(Flow360RequestsV2): alias="lengthUnit", description="project length unit" ) description: str = pd_v2.Field(default="", description="project description") - use_nextflow_pipelines: bool = pd_v2.Field( + use_nextflow: bool = pd_v2.Field( default=False, - alias="useNextflowPipelines", + alias="useNextflow", description="Route geometry processing through Nextflow pipeline instead of legacy system", ) From 47d84e0fe2c84fc2362c96389dfb49f4852bca84 Mon Sep 17 00:00:00 2001 From: Yuan Yao Date: Wed, 1 Apr 2026 14:36:27 -0400 Subject: [PATCH 3/3] fix: use correct field name for NewGeometryRequest use_nextflow_pipelines doesn't match the Pydantic field name use_nextflow, causing a ValidationError at runtime. Co-Authored-By: Claude Opus 4.6 (1M context) --- flow360/component/geometry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow360/component/geometry.py b/flow360/component/geometry.py index a4ac54e30..c19e3c66e 100644 --- a/flow360/component/geometry.py +++ b/flow360/component/geometry.py @@ -243,7 +243,7 @@ def _create_project_root_resource( parent_folder_id=self.folder.id if self.folder else "ROOT.FLOW360", length_unit=self.length_unit, description=description, - use_nextflow_pipelines=self.use_nextflow_pipelines, + use_nextflow=self.use_nextflow_pipelines, ) resp = RestApi(GeometryInterface.endpoint).post(req.dict())