Skip to content

Save reference to Resolver in ConcreteAlgorithm? #180

@seibert

Description

@seibert

I noticed that we copy ConcreteAlgorithms when registered in the resolver:

https://github.com/metagraph-dev/metagraph/blob/main/metagraph/core/resolver.py#L572-L573

This means we could, at time of registration, set an attribute on the ConcreteAlgorithm to the resolver without causing any issue if there are for some reason two resolvers with the same algorithm registered to both? Having that reference would simplify the logic here:

https://github.com/metagraph-dev/metagraph/blob/main/metagraph/core/plugin.py#L618-L628

As it would no longer require the resolver to be passed as an explicit argument. This is the trick I used in #166, but I would like to generalize it, if it makes sense.

@jim22k: Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions