WIP: Allow external pipelines to interface with asimov as plugins
When complete, this MR will allow external pipelines to be accessed by asimov without direct integration into the main package. This will allow a much larger number of pipeline tools to be used with asimov, either by writing a simple shim package which forms the interface between asimov and any pipeline which can be accessed on the pipeline, or by adding a module to a python package and then using setuptools to advertise this as a plugin to asimov.
What?
This MR implements a new plugin interface into asimov to allow new pipelines to be advertised to asimov using a setuptools endpoint.
Who?
This work was carried-out by @daniel-williams.
How?
Using importlib_metadata import entry_points
asimov is now able to search for classes which are specifically marked as entrypoints into a package using setuptools as asimov.pipeline
s.
Full examples of using this interface are given in the documentation.
A plugin package must provide a class which subclasses the asimov.pipelines.Pipeline
class, and overloads the appropriate methods for the plugin pipeline.
In addition, the plugin must provide a template configuration file, if required.
When?
This MR is not required for O4 PE readiness, but is required for O4 downstream PE users.
Checklist
-
New code -
Tests -
Documentation & examples -
Release target