Closed mxndrwgrdnr closed 8 years ago
Could you update the documentation to mention the availability of this new variable?
Just in the orca.run() doctstring?
It's probably most appropriate in the documentation about running pipelines: http://udst.github.io/orca/core.html#running-pipelines
Not sure I have access to update the official docs myself...
The source for that section of the docs is here: https://github.com/UDST/orca/blob/master/docs/core.rst#running-pipelines
OK I think the docs are all up-to-date with your specs.
When using this how would folks know what value j
has so they can pull the value out of the dictionary?
Perhaps a tuple might be a more appropriate data structure. The fact is that the dictionary will only ever have one key:value pair, which changes every time a new step is run. I'm really just using the dictionary as a place to store the iterating step number and step name, so a user would never actually use the key to get the value. As you can see in the documentation I added, I'm accessing the value out of the dictionary just using iter_step.values()[0]
. So maybe since its not being used as a dictionary a tuple makes more sense? Open to suggestions.
Yeah that was what I was thinking. I'd use a namedtuple.
@jiffyclub what do you think? Ready to merge?
Looks good to me!
Pretty straightforward change here. Adding the injectable allows us to periodically query the simulation to determine the current model step. We can use that information in conjunction with the injectable to dynamically track pct. completion and forecast time remaining for simulation runs.