Create your importer plugin#
Since version 1.4, pysteps allows the users to add new importers by installing external packages, called plugins, without modifying the pysteps installation. These plugins need to follow a particular structure to allow pysteps to discover and integrate the new importers to the pysteps interface without any user intervention.
When the plugin is installed, it advertises the new importers to other packages (in our case, pysteps) using the python entry points specification. These new importers are automatically discovered every time that the pysteps library is imported. The discovered importers are added as attributes to the io.importers module and also registered to the io.get_method interface without any user intervention. In addition, since the installation of the plugins does not modify the actual pysteps installation (i.e., the pysteps sources), the pysteps library can be updated without reinstalling the plugin.
There are two ways of creating a plugin. The first one is building the importers plugin from scratch. However, this can be a daunting task if you are creating your first plugin. To facilitate the creating of new plugins, we provide a Cookiecutter template, in a separate project, that creates a template project to be used as a starting point to build the plugin.