Skip to content

Commit e97b83d

Browse files
authored
Merge pull request #38 from aldbr/transformation_hints
Draft: Updated Transformation hints
2 parents 04f318b + f0b2c49 commit e97b83d

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

src/dirac_cwl_proto/transformation/__init__.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,6 @@ def submit_transformation_client(
4343
metadata_path: Optional[str] = typer.Option(
4444
None, help="Path to metadata file used to generate the input query"
4545
),
46-
# Dirac-specific parameters that are used by the jobs
47-
platform: Optional[str] = typer.Option(
48-
None, help="The platform required to run the transformation"
49-
),
50-
priority: Optional[int] = typer.Option(
51-
10, help="The priority of the transformation"
52-
),
53-
sites: Optional[List[str]] = typer.Option(
54-
None, help="The site to run the transformation"
55-
),
5646
# Specific parameter for the purpose of the prototype
5747
local: Optional[bool] = typer.Option(
5848
True, help="Run the jobs locally instead of submitting them to the router"
@@ -84,20 +74,14 @@ def submit_transformation_client(
8474
console.print(f"\t[green]:heavy_check_mark:[/green] Task {task_path}")
8575

8676
# Load the metadata: at this stage, only the structure is validated, not the content
87-
metadata_model = None
77+
metadata_model = TransformationExecutionHooksHint()
8878
if metadata_path:
8979
with open(metadata_path, "r") as file:
9080
metadata = YAML(typ="safe").load(file)
9181
metadata_model = TransformationExecutionHooksHint(**metadata)
92-
else:
93-
metadata_model = TransformationExecutionHooksHint()
9482
console.print("\t[green]:heavy_check_mark:[/green] Metadata")
9583

96-
transformation_scheduling = SchedulingHint(
97-
platform=platform,
98-
priority=priority,
99-
sites=sites,
100-
)
84+
transformation_scheduling = SchedulingHint.from_cwl(task)
10185
console.print("\t[green]:heavy_check_mark:[/green] Description")
10286

10387
transformation = TransformationSubmissionModel(

0 commit comments

Comments
 (0)