Commit graph

1382 commits

Author SHA1 Message Date
Fabio Manganiello 9298f52443
Moved BluetoothPlugin to __init__.py.
All checks were successful
continuous-integration/drone/push Build is passing
This is for consistency with other plugins, that all have their main
plugin class definition inside of `__init__.py`.
2023-09-24 19:21:53 +02:00
Fabio Manganiello c3337ccc6c
[#311] Docs deps autogen sphinx plugin.
All checks were successful
continuous-integration/drone/push Build is passing
Added an `add_dependencies` plugin to the Sphinx build process that
parses the manifest files of the scanned backends and plugins and
automatically generates the documentation for the required dependencies
and triggered events.

This means that those dependencies are no longer required to be listed
in the docstring of the class itself.

Also in this commit:

- Black/LINT for some integrations that hadn't been touched in a long
  time.

- Deleted some leftovers from previous refactors (deprecated
  `backend.mqtt`, `backend.zwave.mqtt`, `backend.http.request.rss`).

- Deleted deprecated `inotify` backend - replaced by `file.monitor` (see
  #289).
2023-09-24 17:00:08 +02:00
Fabio Manganiello 761f2768cb
[#316] Added RPM dependencies.
All checks were successful
continuous-integration/drone/push Build is passing
2023-09-21 23:20:06 +02:00
Fabio Manganiello 648b4224bb
[#285] Removed old covid19 backend.
All checks were successful
continuous-integration/drone/push Build is passing
Those endpoints aren't even working anymore.

Closes: #285
2023-09-21 00:26:35 +02:00
Fabio Manganiello 5d6d37785e
[#288] Removed legacy http.poll backend.
All checks were successful
continuous-integration/drone/push Build is passing
Closes: #288
2023-09-20 23:53:12 +02:00
Fabio Manganiello 7ba9a8930a
[#291] Removed deprecated light.hue backend.
All checks were successful
continuous-integration/drone/push Build is passing
Closes: #291
2023-09-20 23:46:40 +02:00
Fabio Manganiello a6efaad26d
[#306] Removed Travis CI integration.
All checks were successful
continuous-integration/drone/push Build is passing
I've tried my best to keep it around, but the endpoints seem to be
broken, they no longer have a link to their API v3 documentation, and
the API Explorer that was supposed to be in the dashboard is gone.
2023-09-20 23:31:58 +02:00
Fabio Manganiello 3e8d6bb01e Removed typing-extensions dependency.
Some checks failed
continuous-integration/drone/push Build is failing
The package isn't present on older versions of Debian.
2023-09-18 14:05:39 +02:00
Fabio Manganiello 46167a6c2a
Removed legacy zwave backend. 2023-09-17 02:46:24 +02:00
Fabio Manganiello 190cfa21b5
Fixed documentation references to some non-existing events. 2023-09-17 02:41:55 +02:00
Fabio Manganiello 52cb1afb4b
Don't break words in entity value frames. 2023-09-16 02:58:17 +02:00
Fabio Manganiello e947cb1e67
Updated web dist files 2023-09-15 16:22:40 +02:00
Fabio Manganiello 4223576016
We should always update the entities cache on addEntity.
All checks were successful
continuous-integration/drone/push Build is passing
Updating the entity cache only when we receive an event from a root
entity means that we lose events sent by individual child entities.
2023-09-15 00:45:38 +02:00
Fabio Manganiello 1020b63da7
All EntityMixin components should be allowed to emit loading events. 2023-09-15 00:34:29 +02:00
Fabio Manganiello 8ab7b6bebc
Removed deprecated zigbee.mqtt backend.
All checks were successful
continuous-integration/drone/push Build is passing
Closes: #322
2023-09-06 02:54:48 +02:00
Fabio Manganiello b746d0b402
Moved get_message_response to platypush.utils.
All checks were successful
continuous-integration/drone/push Build is passing
It is general-purpose enough to be used by all the integrations, not
only by the HTTP backend.
2023-09-05 13:03:30 +02:00
Fabio Manganiello 2c46b6fe14
Added git a required manifest dependency when needed.
It is needed for packages that install pip packages via git.
2023-08-20 21:19:15 +02:00
Fabio Manganiello a6752ed034
Fixed wrong event path in a manifest file. 2023-08-20 14:08:22 +02:00
Fabio Manganiello 043f303761
s/HttpBackend._DEFAULT_HTTP_PORT/HttpBackend.DEFAULT_HTTP_PORT/g 2023-08-19 13:30:51 +02:00
Fabio Manganiello c2b3ec8ce3
Fixed manifest files with outdated formats. 2023-08-19 12:54:33 +02:00
Fabio Manganiello ec2b8da983
Ignore Redis errors when a backend sends an unregister notify event.
When that happens, it's most likely that the application is already
stopping and the Redis service has already been terminated.
2023-08-17 01:49:41 +02:00
Fabio Manganiello 98e9abde18
Extended manifest files with Python system packages (if available).
All checks were successful
continuous-integration/drone/push Build is passing
- If a Python optional dependency is available as a system package on
  the target system, try and install it that route rather than pip. It's
  usually faster and it decreases the risk of breaking system packages.

- Added support for apk dependencies in manifest files. This brings the
  number of distros officially supported by all the extensions to four:

  - Alpine
  - Arch
  - Debian
  - Ubuntu
2023-08-16 22:43:51 +02:00
Fabio Manganiello 46245e851f
Synchronize with the currently running stop thread (if any) in Backend.wait_stop. 2023-08-15 02:08:47 +02:00
Fabio Manganiello a8a7ceb2ac
Implemented HttpBackend._stop_workers.
The Tornado WSGI container won't guarantee the termination of the
spawned workers upon termination, so the code of the backend has to take
care of it and terminate all the children processes of the server
process when it terminates.

This also means that `psutil` is now a required base dependency, as we
need to expand the process subtree under the webserver launcher.
2023-08-15 00:13:34 +02:00
Fabio Manganiello ceb9d6d1ba
Removed redundant Backend._get_redis() method.
It was used only once, and it could easily be replaced by
`platypush.utils.get_redis()`.
2023-08-14 23:37:38 +02:00
Fabio Manganiello 827b564006
Using a single constant for DEFAULT_REDIS_QUEUE.
Also, catch `AttributeError` on `self._proc.terminate` in the
`HttpBackend`, since the process may already have been terminated and
set to null by another worker process.
2023-08-13 22:20:16 +02:00
Fabio Manganiello 1474685cc0
[Automatic] Updated UI files
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-06 22:51:57 +00:00
Fabio Manganiello 26b4dcba46
Reduced padding of ConfirmDialog body element.
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-07 00:50:10 +02:00
Fabio Manganiello 5184543a3e
Normalize the size of the camera frame container from window size.
Some checks failed
continuous-integration/drone/push Build is failing
If the window is smaller than the camera resolution, then we should
scale down the container size accordingly.
2023-08-07 00:38:19 +02:00
Fabio Manganiello dd313c6371
[Automatic] Updated UI files
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-08-06 21:50:25 +00:00
Fabio Manganiello 2f007888fc
[Automatic] Updated UI files
Some checks failed
continuous-integration/drone/push Build is failing
2023-08-06 21:48:33 +00:00
Fabio Manganiello 609a8c6052
[Automatic] Updated UI files
Some checks failed
continuous-integration/drone/push Build is failing
2023-08-06 21:46:44 +00:00
Fabio Manganiello 276a9a7421
[Automatic] Updated UI files
Some checks failed
continuous-integration/drone/push Build is failing
2023-08-06 21:44:51 +00:00
Fabio Manganiello 715cdcfcff
More consistent style for the buttons on the tokens settings page.
Some checks failed
continuous-integration/drone/push Build is failing
2023-08-06 23:42:50 +02:00
Fabio Manganiello bd49e460d5
More style improvements for the user settings panel.
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-06 23:36:06 +02:00
Fabio Manganiello 6eed558342
More improvements on the users settings panel.
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-08-06 23:14:54 +02:00
Fabio Manganiello 1d47b35219
Updated UI dependencies 2023-08-06 20:38:46 +02:00
Fabio Manganiello 237e0c47cb
Redesigned config panel UI. 2023-08-06 18:49:03 +02:00
Fabio Manganiello e4756eb639
Replaced deprecated flask.escape with markupsafe.escape.
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2023-07-25 00:26:15 +02:00
Fabio Manganiello 91cd08cdff
Adapted tests to use a locally started Redis instance. 2023-07-24 10:37:07 +02:00
Fabio Manganiello 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
Fabio Manganiello dd862db29a
[chore] LINT fixes 2023-07-24 00:35:03 +02:00
Fabio Manganiello 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
Fabio Manganiello 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
Fabio Manganiello 454228c56e
Upgraded UI dependencies 2023-07-23 02:42:14 +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
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
Fabio Manganiello 66981bd00b
Updated email addresses and black'd some old source files. 2023-07-22 23:02:44 +02:00
Fabio Manganiello 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
Fabio Manganiello 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