Commit graph

3633 commits

Author SHA1 Message Date
e982c02524
Set a plugin argument on AssistantEvents besides assistant.
`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.
2024-05-31 19:29:50 +02:00
23e02de1d7
Bump version: 1.0.2 → 1.0.3 2024-05-31 02:57:08 +02:00
ce1525e786
[Automatic] Updated components cache 2024-05-31 00:53:37 +00:00
67478e7ca1 🐛 Fixed proper support for event package alias platypush.events.
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.
2024-05-31 00:52:48 +00:00
c18768e61f Replaced deprecated usages of datetime.utcnow() with datetime.now(UTC). 2024-05-31 00:52:48 +00:00
30362b89e3 [assistant] tts_plugin_args should include join=True by default.
The assistant by default should be configured to wait for response audio
to be fully rendered before proceeding.
2024-05-31 00:52:48 +00:00
5b3c0ad1cf
Bump version: 1.0.1 → 1.0.2 2024-05-26 11:09:51 +02:00
de2bbc53c6
Support both @procedure and @procedure(name) notations. 2024-05-26 11:02:19 +02:00
a4a776986b
Bump version: 1.0.0 → 1.0.1 2024-05-26 04:27:27 +02:00
0f6f119089
Bump version: 0.99.11 → 1.0.0 2024-05-26 04:15:52 +02:00
c64ff40dd3
Bump version: 0.99.10 → 0.99.11 2024-05-26 04:06:15 +02:00
e6702398dc
Bump version: 0.99.9 → 0.99.10 2024-05-26 03:46:51 +02:00
8d26721040
Bump version: 0.99.8 → 0.99.9 2024-05-26 03:32:49 +02:00
0ffff854d3
Bump version: 0.99.7 → 0.99.8 2024-05-26 03:18:16 +02:00
42174b31bc
Bump version: 0.99.6 → 0.99.7 2024-05-26 03:12:26 +02:00
3642d1ffa4
Added dns to mocked modules. 2024-05-26 03:02:57 +02:00
104457a302
Bump version: 0.99.5 → 0.99.6 2024-05-26 01:47:22 +02:00
751d719b04
Bump version: 0.99.4 → 0.99.5 2024-05-26 01:46:29 +02:00
cc670f9d4a
Bump version: 0.99.3 → 0.99.4 2024-05-26 01:26:46 +02:00
ee3933dc77
Bump version: 0.99.2 → 0.99.3 2024-05-26 00:56:29 +02:00
0537815721
Bump version: 0.99.1 → 0.99.2 2024-05-26 00:50:37 +02:00
d3562f4d20
Bump version: 0.99.0 → 0.99.1 2024-05-26 00:44:30 +02:00
1911c05afe
Bump version: 0.50.3 → 0.99.0 2024-05-26 00:25:34 +02:00
6de0b2e041
[Automatic] Updated components cache 2024-05-25 18:12:49 +00:00
35751da068
Added web hooks section to README. 2024-05-25 20:11:07 +02:00
3a4d7afcf0
Clean up all package manager caches after Docker build. 2024-05-25 14:15:13 +02:00
e071e99dab
Remove all cached/compiled Python files after Docker build. 2024-05-25 13:36:52 +02:00
2e0246413c
Replaced an old for ... in ... yield loop with yield from ... 2024-05-25 10:35:23 +02:00
b1dd484704
A more corner-case-proof logic for wants_break_system_packages. 2024-05-25 10:33:05 +02:00
05c6449d8b
Always add --break-system-packages to pip when the Docker context is active.
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.
2024-05-25 10:30:52 +02:00
5e52741986
[Automatic] Updated components cache 2024-05-25 08:19:19 +00:00
7d8a00696c
Adapted Platydock to the new Dockerfile format. 2024-05-25 10:17:45 +02:00
254604e404
py3-vlc has not been merged upstream in Alpine Linux yet. 2024-05-25 10:17:19 +02:00
8e05a7f4c9
Make Dockerfiles work both within and outside a Platypush source dir.
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.
2024-05-25 00:42:30 +02:00
0fd2992894
Added platypush.events alias for platypush.message.event package. 2024-05-24 23:16:15 +02:00
3ccdd4d179
Updated pip ... --break-system-packages configuration.
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.
2024-05-24 22:59:42 +02:00
d20cd4b058
Added a nice ASCII-art logo at application startup. 2024-05-24 22:57:50 +02:00
c49b4ca273
platypush.run should also support procedures in the format procedure.<name>. 2024-05-24 20:20:25 +02:00
5c2204f99d
Allow for custom procedure names on the @procedure decorator.
```
@procedure("foo")
def bar():
    ...
```

Will now be published as `procedure.foo` instead of
`procedure.<module>.bar`.
2024-05-24 20:07:24 +02:00
a211e2e2e4
Changed default permissions for /var/lib/platypush from 0755 to 0750. 2024-05-23 01:15:26 +02:00
4038ef3bc1
[#319] Added platypush/config/systemd directory.
It contains both `platypush.service` and the `sysusers.d` and
`tmpfiles.d` configurations used by the package managers.
2024-05-20 22:19:30 +02:00
c899627eca
[Automatic] Updated components cache 2024-05-20 00:03:25 +00:00
d0f781919d
[#345] Rewritten sun plugin.
Closes: #345
2024-05-20 02:01:40 +02:00
86b4b14112
Added the current running application as a static object.
```python
from platypush import app
```
2024-05-20 01:54:25 +02:00
32b8296244
[#400] Dynamic logic to infer procedures/hooks arguments.
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
2024-05-19 02:17:42 +02:00
70ffe0ec04
[Automatic] Updated components cache 2024-05-17 00:23:06 +00:00
f06233801b
[#394] Dynamically generate setup extras.
Also, convert all code that relied on `manifest.yaml` to use
`manifest.json` instead.

Closes: #394
2024-05-17 02:21:57 +02:00
59c693d6a0
[#394] All manifest.yaml converted to manifest.json.
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`.
2024-05-17 02:21:57 +02:00
79a71d00b4
[Automatic] Updated components cache 2024-05-16 00:44:03 +00:00
c77cf2c98b
[#372] Removed Google Fit plugin.
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
2024-05-16 02:42:54 +02:00