UDST / orca

Python library for task orchestration
https://udst.github.io/orca/
BSD 3-Clause "New" or "Revised" License
53 stars 21 forks source link

added iter_step injectable to track current sim step #13

Closed mxndrwgrdnr closed 8 years ago

mxndrwgrdnr commented 8 years ago

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.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.002%) to 96.518% when pulling 62434bb6b1ba9ba6629f819c7875b838bbbd7aab on mxndrwgrdnr:master into 598329671baddc7200b37fa428cb6b94e2e211ce on UDST:master.

jiffyclub commented 8 years ago

Could you update the documentation to mention the availability of this new variable?

mxndrwgrdnr commented 8 years ago

Just in the orca.run() doctstring?

jiffyclub commented 8 years ago

It's probably most appropriate in the documentation about running pipelines: http://udst.github.io/orca/core.html#running-pipelines

mxndrwgrdnr commented 8 years ago

Not sure I have access to update the official docs myself...

jiffyclub commented 8 years ago

The source for that section of the docs is here: https://github.com/UDST/orca/blob/master/docs/core.rst#running-pipelines

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.002%) to 96.518% when pulling 161bd30441d1e9567893c74a28accdfb50669296 on mxndrwgrdnr:master into 598329671baddc7200b37fa428cb6b94e2e211ce on UDST:master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.002%) to 96.518% when pulling 12e6149bb5a8bfd083d96750fc3e4e0ec98da60b on mxndrwgrdnr:master into 598329671baddc7200b37fa428cb6b94e2e211ce on UDST:master.

mxndrwgrdnr commented 8 years ago

OK I think the docs are all up-to-date with your specs.

jiffyclub commented 8 years ago

When using this how would folks know what value j has so they can pull the value out of the dictionary?

mxndrwgrdnr commented 8 years ago

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.

jiffyclub commented 8 years ago

Yeah that was what I was thinking. I'd use a namedtuple.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.002%) to 96.518% when pulling 233ac292f6178fdb0505c077d1f291c95ddecb4e on mxndrwgrdnr:master into 598329671baddc7200b37fa428cb6b94e2e211ce on UDST:master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.005%) to 96.521% when pulling c9048abc132963a885f7da97bd90f1f371ded20f on mxndrwgrdnr:master into 598329671baddc7200b37fa428cb6b94e2e211ce on UDST:master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.005%) to 96.521% when pulling 1cd58479117d9f9f60d1095547abcd11a1551c7b on mxndrwgrdnr:master into 598329671baddc7200b37fa428cb6b94e2e211ce on UDST:master.

mxndrwgrdnr commented 8 years ago

@jiffyclub what do you think? Ready to merge?

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.005%) to 96.521% when pulling ccf1c71739d59ef75d1c324aeaf132d0451bdf9a on mxndrwgrdnr:master into 598329671baddc7200b37fa428cb6b94e2e211ce on UDST:master.

jiffyclub commented 8 years ago

Looks good to me!

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.002%) to 96.518% when pulling 1e4f992893ee34aaa870c738f86639d899b1172a on mxndrwgrdnr:master into 598329671baddc7200b37fa428cb6b94e2e211ce on UDST:master.