Skip to content

Commit 2a61e43

Browse files
author
Alan Christie
committed
fix: Fix schema for variables
1 parent 65a5d79 commit 2a61e43

File tree

2 files changed

+52
-2
lines changed

2 files changed

+52
-2
lines changed

tests/workflow-definitions/simple-python-molprops-with-options.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,56 @@ kind: DataManagerWorkflow
33
kind-version: "2025.1"
44
name: python-workflow
55
description: A simple python experimental workflow
6+
7+
# Some meaningless variables.
8+
# Just to make sure the decoder accepts this.
9+
# The Workflow engin eis not (yet) interested in this block.
10+
variables:
11+
inputs:
12+
type: object
13+
required:
14+
- inputFile
15+
properties:
16+
inputFile:
17+
title: Molecules to pick from
18+
mime-types:
19+
- squonk/x-smiles
20+
type: file
21+
seeds:
22+
title: Molecules that are already picked
23+
mime-types:
24+
- squonk/x-smiles
25+
type: file
26+
multiple: true
27+
outputs:
28+
type: object
29+
properties:
30+
outputFile:
31+
title: Output file
32+
mime-types:
33+
- chemical/x-csv
34+
creates: '{{ outputFile }}'
35+
type: file
36+
options:
37+
type: object
38+
required:
39+
- count
40+
properties:
41+
outputFile:
42+
title: Output file name
43+
type: string
44+
pattern: "^[A-Za-z0-9_/\\.\\-]+$"
45+
default: diverse.smi
46+
count:
47+
title: Number of molecules to pick
48+
type: integer
49+
minimum: 1
50+
threshold:
51+
title: Similarity threshold
52+
type: number
53+
minimum: 0
54+
maximum: 1
55+
656
variable-mapping:
757
inputs:
858
- name: candidateMolecules

workflow/workflow-schema.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ properties:
3030
variables:
3131
# A Job-compliant set of variable declarations for the workflow.
3232
# This block structure is a reproduction of that used in Job definitions
33-
# and, like JObs, has no current schema.
33+
# and, like Jobs, has no current schema so we permit anything here.
3434
type: object
35-
additionalProperties: false
35+
additionalProperties: true
3636
variable-mapping:
3737
# Workflow-specific variable declarations,
3838
# used (at the moment) to map workflow variables to steps.

0 commit comments

Comments
 (0)