Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The following will be soon possible to do in Delta Shell:

!DeltaShellScripting1.pngImage Added

After running the script, a new time series is created and then added to the project. Then it is opened in the view.

Image Added

Maybe this is the way we should write our integration tests in the future (smile). It stimulates to have a well designed API. For example I immediately think that adding items to the project and opening them in the gui can be simplified (KISS principle), e.g.:

Code Block
# create water depth time series, add it to the project and open it in the gui

waterDepth = TimeSeries.Create[float](Name = "water depth") # maybe we don't need a TimeSeries as a type?

waterDepth[DateTime(2009, 1, 1)] = 0.1
waterDepth[DateTime(2009, 1, 2)] = 0.2
waterDepth[DateTime(2009, 1, 3)] = 0.5
waterDepth[DateTime(2009, 1, 4)] = 0.3
waterDepth[DateTime(2009, 1, 5)] = 0.4
waterDepth[DateTime(2009, 1, 6)] = 0.1

CurrentProject.Add(waterDepth)

Gui.OpenView(waterDepth)

...