Skip to content

[Refactor] Standardize plugin architecture for workflows #936

@fderuiter

Description

@fderuiter

Context

The SDK currently loads the imednet-workflows plugin via a dynamic import_module inside a try/except block, returning Any. This defeats static typing, breaks IDE autocomplete for sdk.workflows, and introduces a hidden dependency anti-pattern.

Implementation Plan

  • Refactor the workflow loading mechanism to use importlib.metadata.entry_points.
  • The imednet-workflows package should register itself to an imednet.plugins entry point in its pyproject.toml.
  • Ensure Mypy/Pyright can correctly infer the types of loaded workflows.

Acceptance Criteria

  • import_module("imednet_workflows.namespace") is replaced with standard entry point discovery.
  • Plugin registration is handled via pyproject.toml in the workflows package.
  • Static typing is preserved for the .workflows namespace.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions