Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions flow360/cloud/flow360_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ class NewGeometryRequest(Flow360RequestsV2):
alias="lengthUnit", description="project length unit"
)
description: str = pd_v2.Field(default="", description="project description")
use_nextflow: bool = pd_v2.Field(
default=False,
alias="useNextflow",
description="Route geometry processing through Nextflow pipeline instead of legacy system",
)


class NewSurfaceMeshRequestV2(Flow360RequestsV2):
Expand Down
15 changes: 12 additions & 3 deletions flow360/component/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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=self.use_nextflow_pipelines,
)

resp = RestApi(GeometryInterface.endpoint).post(req.dict())
Expand Down Expand Up @@ -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
Expand Down
Loading