1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-11-24 17:12:29 +00:00
senpy/example-plugins
J. Fernando Sánchez 21a5a3f201 Macro commit
* Fixed Options for extra_params in UI
* Enhanced meta-programming for models
* Plugins can be imported from a python file if they're named
`senpy_<whatever>.py>` (no need for `.senpy` anymore!)
* Add docstings and tests to most plugins
* Read plugin description from the docstring
* Refactor code to get rid of unnecessary `.senpy`s
* Load models, plugins and utils into the main namespace (see __init__.py)
* Enhanced plugin development/experience with utils (easy_test, easy_serve)
* Fix bug in check_template that wouldn't check objects
* Make model defaults a private variable
* Add option to list loaded plugins in CLI
* Update docs
2018-01-06 21:03:20 +01:00
..
async_plugin.py Macro commit 2018-01-06 21:03:20 +01:00
basic_plugin.py Macro commit 2018-01-06 21:03:20 +01:00
basic.py Macro commit 2018-01-06 21:03:20 +01:00
configurable_plugin.py Macro commit 2018-01-06 21:03:20 +01:00
dummy_plugin.py Macro commit 2018-01-06 21:03:20 +01:00
dummy_required_plugin.py Macro commit 2018-01-06 21:03:20 +01:00
mynoop.py Macro commit 2018-01-06 21:03:20 +01:00
mynoop.senpy Macro commit 2018-01-06 21:03:20 +01:00
parameterized_plugin.py Macro commit 2018-01-06 21:03:20 +01:00
README.md Macro commit 2018-01-06 21:03:20 +01:00
sleep_plugin.py Macro commit 2018-01-06 21:03:20 +01:00

This is a collection of plugins that exemplify certain aspects of plugin development with senpy. In ascending order of complexity, there are:

  • Basic: a very basic analysis that does sentiment analysis based on emojis.
  • Configurable: a version of basic with a configurable map of emojis for each sentiment.
  • Parameterized: like basic_info, but users set the map in each query (via extra_parameters).
  • mynoop: shows how to add a definition file with external requirements for a plugin. Doing this with a python-only module would require moving all imports of the requirements to their functions, which is considered bad practice.
  • Async: a barebones example of training a plugin and analyzing data in parallel.

All of the plugins in this folder include a set of test cases and they are periodically tested with the latest version of senpy.

Additioanlly, for an example of stand-alone plugin that can be tested and deployed with docker, take a look at: lab.cluster.gsi.dit.upm.es/senpy/plugin-example bbm