You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a user, I want to be able to pass an int or None to the runtime.start method and process.run, rather than an AbstractRunCondition. If I pass an int, runtime.start should create a RunSteps condition with the value of the int as the number of steps. If I pass None, runtime.start should create a RunContinuous condition. This will reduce the need to import or know about the RunCondition classes for the vast majority of use cases.
Conditions of satisfaction
User can pass an AbstractRunCondition, int, or None for the condition parameter of Process.run
User can pass an AbstractRunCondition, int, or None for the condition parameter of Runtime.start
If the condition is an int, that will be used as the number of steps to run the process.
If the condition is None, the process will run with a RunContinuous condition.
The text was updated successfully, but these errors were encountered:
Hi @tim-shea , I noticed this issue and I've actually been working on something similar. Rather than passing int or None to process.run(), I created a new class which takes num_steps and blocking as parameters. It uses the __new__ method to then either create a RunSteps or RunContinuous instance depending on the type of num_steps.
I saw the PR you linked was closed, but I'd be happy to make a branch on my lava fork with the class I wrote. I haven't actually used it to call a RunContinuous instance (I never use that class), but I wrote some tests to make sure it creates an instance of the correct class.
User story
As a user, I want to be able to pass an int or None to the runtime.start method and process.run, rather than an AbstractRunCondition. If I pass an int, runtime.start should create a RunSteps condition with the value of the int as the number of steps. If I pass None, runtime.start should create a RunContinuous condition. This will reduce the need to import or know about the RunCondition classes for the vast majority of use cases.
Conditions of satisfaction
The text was updated successfully, but these errors were encountered: