Skip to content

ENH: Allow should_run to actually enable NetworkX style should_run #6

@seberg

Description

@seberg

NetworkX has can and should run. Where can-run says whether the backend is able to run it, while "should run" indicates that the backend prefers not to run. A reason for this would be large conversion cost for example.

Spatch should_run is currently more a can_run, able to reject running (e.g. it may not support all parameters) beyond the default type matching.

In my opinion, the way this is handled is OK, but spatch should allow what NetworkX does.
That is:

  • Allow should_run to return a "if needed" style value.
  • When it is returned, call this backend if there is no other choice.
  • There is a tricky situation if multiple backends say "if needed". In that case, I could see a future where should_run() is called a second time with additional information.

See also the discussion with @Schefflera-Arboricola in #3 (comment)

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