Skip to content

Commit

Permalink
feat: add init_parameters to python run spec
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-s committed Feb 12, 2025
1 parent 17a2b9b commit 19dbf06
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package it.smartcommunitylabdhub.runtime.python.specs;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import it.smartcommunitylabdhub.commons.annotations.common.SpecType;
import it.smartcommunitylabdhub.commons.jackson.annotations.JsonSchemaIgnore;
Expand Down Expand Up @@ -41,6 +42,9 @@ public class PythonRunSpec extends RunBaseSpec {

private Map<String, Serializable> parameters = new HashMap<>();

@JsonProperty("init_parameters")
private Map<String, Serializable> initParameters = new HashMap<>();

public PythonRunSpec(Map<String, Serializable> data) {
configure(data);
}
Expand All @@ -59,6 +63,7 @@ public void configure(Map<String, Serializable> data) {
this.inputs = spec.getInputs();
// this.outputs = spec.getOutputs();
this.parameters = spec.getParameters();
this.initParameters = spec.getInitParameters();
}

public void setTaskJobSpec(PythonJobTaskSpec taskJobSpec) {
Expand Down
10 changes: 10 additions & 0 deletions schemas/specs/run/python+run.json
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,16 @@
},
"type" : "object",
"properties" : {
"init_parameters" : {
"$ref" : "#/$defs/Map_String.Serializable_",
"title" : "fields.initParameters.title",
"description" : "fields.initParameters.description",
"additionalProperties" : {
"$ref" : "#/$defs/Serializable",
"title" : "fields.initParameters.item.title",
"description" : "fields.initParameters.item.description"
}
},
"inputs" : {
"$ref" : "#/$defs/Map_String.String_",
"title" : "fields.inputs.title",
Expand Down

0 comments on commit 19dbf06

Please sign in to comment.