You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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
7 years ago
..
README.md Macro commit 7 years ago
async_plugin.py Macro commit 7 years ago
basic.py Macro commit 7 years ago
basic_plugin.py Macro commit 7 years ago
configurable_plugin.py Macro commit 7 years ago
dummy_plugin.py Macro commit 7 years ago
dummy_required_plugin.py Macro commit 7 years ago
mynoop.py Macro commit 7 years ago
mynoop.senpy Macro commit 7 years ago
parameterized_plugin.py Macro commit 7 years ago
sleep_plugin.py Macro commit 7 years ago

README.md

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