`assistant` contains the assistant plugin object that triggered the
event, but you can't create event hook conditions on attributes that are
plugins.
The event should also store a `plugin` attribute which contains the
unique plugin name, so hooks like these can be built:
```
from platypush import hook
from platypush.events.assistant import ConversationStartEvent
@when(ConversationStartEvent, plugin="assistant.google")
def on_google_conversation_start():
...
```
It wouldn't be possible to construct a hook condition like the one above
on the plugin object reported on the `assistant` attribute.
Even though `platypush.events` is just a symlink to
`platypush.message.event`, imports from those two modules will be
treated as different imports, thus hook conditions build on
`platypush.events` imports will never match.
This fixes the case where Platydock is called within the context of a
virtual environment, but it needs to generate a Docker image - and
therefore, unless the host virtual environment, it needs
--break-system-packages to write to /usr.
If the Platypush setup.py is found in the current directory, then use
that directory as the base for the new image.
Otherwise, clone the repo on the fly and build the image from there.
All the latest versions of Alpine, Debian, Ubuntu and Fedora now require
`--break-system-packages` when installing packages via `pip` outside of
a virtual environment, even if it's within a container.
This allows procedures and event hooks to have more flexible signatures.
Along the lines of:
```python
@when(SomeEvent)
def hook(event):
...
@when(SomeOtherEvent)
def hook2():
...
```
Instead of supporting only the full context spec:
```python
@when(SomeEvent)
def hook(event, **ctx):
...
```
Closes: #400
YAML isn't part of the Python standard library, while JSON is.
If we want `setup.py` to dynamically parse the available integration
manifest files in order to populate the extra dependencies, then it's
better to rely on a JSON format for manifest files - the parser is part
of the standard library and it doesn't require the user to install
`pyyaml` before `platypush`.
The Fit API has (unfortunately) been deprecated by Google with no
alternatives - the new Health Connect API is only available on Android
devices.
Other Google APIs don't seem to be affected by the refresh token issue
either, so this should hopefully close that issue too.
Closes: #372