-
Notifications
You must be signed in to change notification settings - Fork 100
Chris workflow
##Developing a Chris plugin app Chris plugin apps are Python packages that contain a module with the same name as the package.They are added to the system under the services package in the plugins django app. So given a Chris plugin app called simplefsapp it is possible to import it anywhere in Chris:
from plugins.services.simplefsapp import simplefsapp
The Python module must define a class that inherits from ChrisApp, the base class for all Chris plugin apps. Two methods are required to be overwritten:
- define_parameters(self)
- run(self, options)
The first method can be overridden to define the arguments expected by the Chris plugin app. This can be done by calling the add_parameter method to individually define each single argument. add_parameter accepts the same arguments as the add_argument method of the ArgumentParser class defined in the Python's standard [argparse] (https://docs.python.org/3/library/argparse.html#module-argparse) module.