pjf/exobrain

Move from scripts to classes

pjf opened this issue · 2 comments

pjf commented

Right now all end-points and actions are in scripts. There are a lot of them. They're cluttered. They don't inherit from any base class, or consume any common role.

We should fix this, because it will reduce a lot of boilerplate, and will make it much easier to write extensions. At the very least, I expect we'll want roles (or maybe classes) for:

  • Exobrain::Source (produces Exobrain::Measurement:: packets)
  • Exobrain::Action (consumes measurements, produces intents)
  • Exobrain::Sink (consumes Exobrain::Intent:: packets)

Our scripts can then be moved to classes which consume these roles. AFAIK Ubic can start/stop classes just fine. :)

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1406284-move-from-scripts-to-classes?utm_campaign=plugin&utm_content=tracker%2F347315&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F347315&utm_medium=issues&utm_source=github).
pjf commented

This is partially done, but in Exobrain::Agent and friends.

Leaving this ticket open because we want to move all the old scripts across to class-based agents.

pjf commented

This is even more done. Leaving open pending me writing actual docs.