Green-Software-Foundation/if-plugins

Query - How do we have dynamic `inputs` values in manifest file before pipeline execution?

pangteckchun opened this issue · 2 comments

Hi, would like to know what is the suggested way to get say timestamp and duration input parameters programmatically into a manifest file before kicking off an pipeline run?
This is so we can derive a SCI for an app, based on a desired time period but this values will be user-driven and dynamic. Today when we test, we "hardcode" them as inputs in the manifest file.

Thank you!
TC

Hi @pangteckchun - for this you can use the MockObservations plugin. You can provide a start and end time (as ISO 8061 strings) and the duration of each timestep - the plugin will then generate an array of observations with timestamps spaced according to that config. You can also add other arbitrary data to the mock input array using the other plugin parameters. See here: https://github.com/Green-Software-Foundation/if-plugins/blob/main/src/lib/mock-observations/README.md

Hi James, thank you for the suggestion.
What we need is to have the timestamp and duration values populated into the manifest file as fields, then we will run ie on the command line against that manifest file. So MockObervations does not fulfill that need.

In this case, we might then dynamically generate the entire manifest file before running ie command. The timestamp and duration values will come from user selected inputs and we will generate the manifest file accordingly for the inputs[] section.

Thanks again! I am closing this thread.