Open pedro-psb opened 1 year ago
I've read pluggy docs and about pytest hooks and I really think we should pick it. It will streamline the modular architecture we want to build and provide good guidelines for this kind of library organization (mainly, pytest/pluggy docs and pytest codebase).
I don't think we need to reinvent the wheel here, and if for some reason we want/need to drop it, we'll have learned a lot about plugin system patterns.
Context and Problem Statement
The new project requires a plugin system to keep the core minimal.
What tools should we use to build a plugin system?
Decision Drivers
Open
Considered Options
Pros and Cons of the Options
Pluggy
Pluggy is the plugin library used by pytest, which is maybe the most well known plugin system in the python ecosystem.
about pluggy | pytest hooks examples
From Scratch
Python entrypoints system can be used to build a plugin system alongside
importlib
.entrypoints specifications | setuptools userguide on entrypoints