Commit graph

3792 commits

Author SHA1 Message Date
5fd40af285 Revert "Added explicit --help option."
This reverts commit 1304be0718.
2023-07-24 02:38:12 +02:00
1304be0718 Added explicit --help option.
argparse.ArgumentParser doesn't seem to add the option automatically
anymore.
2023-07-24 02:11:42 +02:00
e9a568fdd2
Unified interface to retrieve the Redis bus configuration.
A common `utils.get_redis_conf` has been created to handle the cascade
fallback logic used to retrive the default Redis configuration.
2023-07-24 01:04:13 +02:00
77ffefdccb
Added a Config.set method.
A useful interface to change configuration values at runtime.
2023-07-24 00:48:07 +02:00
dd862db29a
[chore] LINT fixes 2023-07-24 00:35:03 +02:00
3e3d47aa44
Check first the configuration of the Redis plugin and then that of the backend. 2023-07-24 00:26:49 +02:00
315a89fb65
Added a default parameter to Config.get. 2023-07-23 23:31:57 +02:00
37dcaba7a1
Refactored structure of main application and startup scripts.
The main application class has been moved from __init__ to the app
module.

__init__ will contain instead the relevant global variables and the
modules and objects exposed to external integrations - such as
`get_plugin` and `get_backend`, or the `main` itself.

This will make future integrations much easier - the global __init__
doesn't contain any business logic now, it can import anything without
fearing circular dependencies, and it can limit its exposed objects to
those that we want to expose to 3rd-party integrations and scripts.

It will also make it easier to extend the main entry point with
additional logic - such as a supervisor or an embedded Redis server.
2023-07-23 23:12:36 +02:00
0dc380fa94
Removed dependency from prctl.
Also, black'd and LINT-fixed some files that hadn't been touched in a
while.
2023-07-23 19:17:30 +02:00
04b759e4d5
Upgraded base Python image in example Dockerfile.
3.7 -> 3.11
2023-07-23 17:27:48 +02:00
15a34ebac9
Upgraded Docker base image.
Debian base image bumped from Bullseye -> Bookworm.
2023-07-23 17:25:52 +02:00
cfdecd5703
[#267] Don't show the PWA popup again after the user dismisses it.
Plus, upgraded a bunch of frontend libraries.

Closes: #267
2023-07-23 02:44:17 +02:00
454228c56e
Upgraded UI dependencies 2023-07-23 02:42:14 +02:00
11f336b9b5
Merge pull request #386 from BlackLight/dependabot/npm_and_yarn/platypush/backend/http/webapp/word-wrap-1.2.5
Bump word-wrap from 1.2.3 to 1.2.5 in /platypush/backend/http/webapp
2023-07-22 23:49:40 +02:00
dependabot[bot]
33699fcac8
Bump word-wrap from 1.2.3 to 1.2.5 in /platypush/backend/http/webapp
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.5.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.5)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-22 21:48:53 +00:00
ac9950a441
Merge pull request #385 from BlackLight/dependabot/npm_and_yarn/platypush/backend/http/webapp/webpack-5.88.2
Bump webpack from 5.70.0 to 5.88.2 in /platypush/backend/http/webapp
2023-07-22 23:47:50 +02:00
dependabot[bot]
505cba44b8
Bump webpack from 5.70.0 to 5.88.2 in /platypush/backend/http/webapp
Bumps [webpack](https://github.com/webpack/webpack) from 5.70.0 to 5.88.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.70.0...v5.88.2)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-22 21:46:59 +00:00
1d98f54c54
Bump version: 0.50.2 → 0.50.3 2023-07-22 23:36:04 +02:00
a65988546b
Updated CHANGELOG 2023-07-22 23:35:58 +02:00
66981bd00b
Updated email addresses and black'd some old source files. 2023-07-22 23:02:44 +02:00
cf8ecf349b Merge pull request '[#266] XMPP integration implementation' (#269) from 266-xmpp-integration into master
Reviewed-on: platypush/platypush#269
2023-07-22 22:40:35 +02:00
3eda0c6f17
[#268] Implemented XMPP integration. 2023-07-22 22:36:36 +02:00
63afd90701
Serialize exceptions in the default JSON serializers.
This allows us to easily pass errors in internal JSON payloads, and
ensure that these are serialized consistently across all the
integrations.
2023-07-22 15:14:05 +02:00
cef9d0e007
Always serialize exception names when logging/returning request exceptions. 2023-07-22 15:13:17 +02:00
d49e5b1f6a
Expose Config.workdir property.
This is a useful proxy to avoid using `Config.get('workdir')` string
lookup.
2023-07-22 15:11:58 +02:00
c846c61493
Refactored Config.__init__.
The constructor of the `Config` class had grown too big. It's much more
manageable if split into multiple sub-constructor helpers.
2023-07-15 13:38:07 +02:00
0a3d6add83
Support ./config.yaml as a config file location. 2023-07-15 01:29:41 +02:00
fa1364d854
Improved logging for requests, responses and events.
- The following logging namespaces are now used, to make it easier to
  filter only log lines related to the logged application message:

  - `platypush:events`
  - `platypush:requests`
  - `platypush:responses`

- Those messages are always logged as JSON, with no prefixes nor
  suffixes.

- Requests are always logged when executed - no more delegation to the
  upstream backend.

- Responses are always logged when fully populated (including `id`,
  `origin`, `target` etc.), instead of being logged when still partially
  populated. This makes it particularly easy to link request/response
  IDs directly from the logs.
2023-07-15 01:11:45 +02:00
cb04af0bbd
Catch TypeError when execution an action.
Most of TypeError are due to the user passing wrong data. It usually
doesn't mean that we have to fail hard and reload the plugin, nor retry
the call with the same parameters.
2023-07-14 22:20:27 +02:00
27cf1bec52
Removed some optional top-level imports.
Optional top-level imports in Tornado route declarations will trigger
`ImportError`. While this will just mean that those routes will be
skipped, it will also generate a lot of noise on the logs.
2023-07-01 03:13:38 +02:00
e0af2daaff
Bump version: 0.50.1 → 0.50.2 2023-06-30 23:12:40 +02:00
8c063e2d03
Updated CHANGELOG 2023-06-30 23:12:13 +02:00
42a990a132
Format string typo fix 2023-06-30 23:07:00 +02:00
9a7fc031d9
A more robust logic to detect plugins by class type in get_plugin. 2023-06-30 23:01:09 +02:00
f3b2386ed6
Bump version: 0.50.0 → 0.50.1 2023-06-28 02:44:13 +02:00
17044ebf6b
Updated setup.py version 2023-06-28 02:43:40 +02:00
08c3a1e11a
Bump version: 0.24.5 → 0.50.0 2023-06-28 02:23:09 +02:00
f5f0a2f5ab
Updated version number in the CHANGELOG 2023-06-28 02:20:27 +02:00
2f441e1aaa
Updated README.
- Added web panels screenshots.
- Added documentation for event hooks with structured/relational
  filters.
- Added documentation for the nginx configuration and the PWA support.
2023-06-28 02:18:35 +02:00
5e5403287e
The inspect plugin should not fail hard if the cache couldn't be loaded.
This can happen for many reasons - not only if the cache file is not
accessible, but also if the structure/signature of some pickled objects
has changed. In that case, we should invalidate the current cache and
re-initialize it instead of failing.
2023-06-28 01:33:12 +02:00
c5059f6908
Updated CHANGELOG 2023-06-28 00:12:03 +02:00
ba827b0248
Added sound plugin documentation.
- Added example of how to stream audio over HTTP.

- Added Portaudio to the apt/pacman dependencies.
2023-06-28 00:10:36 +02:00
a103ea49f1
Fixed ffmpeg/audio consumer synchronization upon timeout. 2023-06-27 15:12:15 +02:00
77f7cd8b90
Don't use typing.Self (yet).
typing.Self has only been introduced in Python 3.10.
2023-06-27 14:17:04 +02:00
b01bf43552 Merge pull request 'New streaming endpoints' (#265) from 264-streaming-endpoints into master
Reviewed-on: platypush/platypush#265
2023-06-27 13:38:12 +02:00
f2540437b7
Sound plugin rewritten almost from scratch. 2023-06-27 13:31:38 +02:00
2fb6e4d7d0
Updated webapp dist files 2023-06-16 15:48:23 +02:00
2f4229d7b1
pylint fixes for the camera plugin. 2023-06-16 15:40:05 +02:00
9aa8e4538a
Better termination logic for the ffmpeg audio converter. 2023-06-16 11:47:37 +02:00
a6351dddd4
Extracted AudioRecorder out of SoundPlugin. 2023-06-16 03:12:55 +02:00