Skip to content

Commit

Permalink
Use dict instead of tuple for timespan
Browse files Browse the repository at this point in the history
  • Loading branch information
fivegrant committed Jun 14, 2023
1 parent 820ce6d commit 2fb64c2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
33 changes: 24 additions & 9 deletions paths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@
type: string
example: "ba8da8d4-047d-11ee-be56"
timespan:
type: array
type: object
properties:
start:
type: integer
example: 0
end:
type: integer
example: 0
items:
type: integer
example: [0, 90]
Expand Down Expand Up @@ -69,10 +76,14 @@
type: string
example: "dataset.csv"
timespan:
type: array
items:
type: integer
example: [0, 90]
type: object
properties:
start:
type: integer
example: 0
end:
type: integer
example: 0
extra:
description: optional extra system specific arguments for advanced use cases
type: object
Expand Down Expand Up @@ -112,10 +123,14 @@
type: string
example: ["ba8da8d4-047d-11ee-be56", "c1cd941a-047d-11ee-be56", "c4b9f88a-047d-11ee-be56"]
timespan:
type: array
items:
type: integer
example: [0, 90]
type: object
properties:
start:
type: integer
example: 0
end:
type: integer
example: 0
extra:
description: optional extra system specific arguments for advanced use cases
type: object
Expand Down
3 changes: 3 additions & 0 deletions src/service/ArgIO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ function prepare_input(args; context...)
if settings["ENABLE_TDS"]
update_simulation(context[:job_id], Dict([:status=>"running", :start_time => time()]))
end
if in(:timespan, keys(args))
args[:timespan] = (args[:timespan]["start"], args[:timespan]["end"])
end
if in(:model_config_id, keys(args))
args[:model] = fetch_model(args[:model_config_id])
end
Expand Down

0 comments on commit 2fb64c2

Please sign in to comment.