refactor: Make EffectPlugin an abstract base class, update effects to inherit from it, and improve plugin discovery. #32

Merged
genewildish merged 1 commits from chore/plugin-migration into main 2026-03-19 06:15:42 +00:00
Owner

chore: migrate effect plugins to ABC paradigm

Updates the effect plugin system to use proper ABC (Abstract Base Class) inheritance in preparation for david's
feature/vector_display rebase.

Changes:

  • EffectPlugin now inherits from ABC with @abstractmethod decorators for process() and configure()
  • All 4 plugins (NoiseEffect, FadeEffect, GlitchEffect, FirehoseEffect) updated to explicitly inherit from EffectPlugin
  • Discovery mechanism switched from duck-typing to issubclass() check for robustness
  • Added camera_x field to EffectContext (defaults to 0, available for camera-aware effects)
  • Added create_effect_context() factory function with sensible defaults

Why:

  • Standardizes plugin interface on the ABC approach david's branch uses
  • Reduces merge conflicts when his rebase lands
  • Better error messages: missing method implementations fail at plugin load time, not at runtime
  • All tests passing (259/262; 3 pre-existing failures unrelated to this change)
chore: migrate effect plugins to ABC paradigm Updates the effect plugin system to use proper ABC (Abstract Base Class) inheritance in preparation for david's feature/vector_display rebase. Changes: - EffectPlugin now inherits from ABC with @abstractmethod decorators for process() and configure() - All 4 plugins (NoiseEffect, FadeEffect, GlitchEffect, FirehoseEffect) updated to explicitly inherit from EffectPlugin - Discovery mechanism switched from duck-typing to issubclass() check for robustness - Added camera_x field to EffectContext (defaults to 0, available for camera-aware effects) - Added create_effect_context() factory function with sensible defaults Why: - Standardizes plugin interface on the ABC approach david's branch uses - Reduces merge conflicts when his rebase lands - Better error messages: missing method implementations fail at plugin load time, not at runtime - All tests passing (259/262; 3 pre-existing failures unrelated to this change)
genewildish added 1 commit 2026-03-19 06:13:05 +00:00
genewildish merged commit 0819f8d160 into main 2026-03-19 06:15:42 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: genewildish/Mainline#32