Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function to activate mode using a list of methods #108

Closed
fohrloop opened this issue Dec 19, 2023 · 0 comments
Closed

Function to activate mode using a list of methods #108

fohrloop opened this issue Dec 19, 2023 · 0 comments
Assignees
Milestone

Comments

@fohrloop
Copy link
Owner

fohrloop commented Dec 19, 2023

Splitting this work from #69 into its own ticket.

Task

  • Create an activate() function which looks something like this
def activate(methods: list[MethodCls], ...) -> tuple[ActivationResult, HeartBeat|None]:
    prioritized_methods = prioritize_methods(methods)
    result = ActivationResult()

    for method in prioritized_methods:
        methodresult, heartbeat = activate_using(method, ...)
        result.add(methodresult)
        if result.success:
            break
    return result, heartbeat
  • In this first version, the returned heartbeat can always be None and there will be separate task for creating the Heartbeat class. The Heartbeat might not be part of 0.8.0 release as there are no heartbeat-based Methods yet.

Related PRs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant