Commit Graph

38 Commits

Author SHA1 Message Date
Fabio Manganiello 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
Fabio Manganiello c3337ccc6c
[#311] Docs deps autogen sphinx plugin.
continuous-integration/drone/push Build is passing Details
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.
continuous-integration/drone/push Build is passing Details
2023-09-21 23:20:06 +02:00
Fabio Manganiello 3e8d6bb01e Removed `typing-extensions` dependency.
continuous-integration/drone/push Build is failing Details
The package isn't present on older versions of Debian.
2023-09-18 14:05:39 +02:00
Fabio Manganiello 98e9abde18
Extended manifest files with Python system packages (if available).
continuous-integration/drone/push Build is passing Details
- 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 f51beb271e
Large refactor + stability fixes for the external process control logic. 2023-08-15 11:12:21 +02:00
Fabio Manganiello d1f0e1976c
Exclude squashfs/loopback mounts from `system.disk_info`. 2023-05-06 18:53:16 +02:00
Fabio Manganiello a3888be216
The robustness check in case of missing fields should also apply to other system entities. 2023-04-29 16:08:38 +02:00
Fabio Manganiello 8c9768b05e
Robustness check for system disk entities.
When the system information is still loading it may happen that the
device associated to the disk hasn't been loaded yet.
2023-04-29 16:04:57 +02:00
Fabio Manganiello dc3392c11d
Disk I/O stats are not always available and should therefore be optional. 2023-04-23 22:25:24 +02:00
Fabio Manganiello 27b1048789
Converted `system.processes` to the new data model. 2023-04-23 02:08:43 +02:00
Fabio Manganiello 387616ea96
Convert `system.connected_users` to the new data model. 2023-04-23 01:12:07 +02:00
Fabio Manganiello 763d9e06ec
Increased default `poll_interval` for `system` plugin to 60 seconds. 2023-04-23 00:42:44 +02:00
Fabio Manganiello a72c32cb00
Added battery entity support to `system` plugin. 2023-04-23 00:41:21 +02:00
Fabio Manganiello b3440ab96b
Added support for fan sensors on the `system` plugin. 2023-04-23 00:08:27 +02:00
Fabio Manganiello 45d5f439be
Added support for system temperature sensor entities. 2023-04-22 22:42:11 +02:00
Fabio Manganiello 1b048e1952
s/net_connections/network_connections/g 2023-04-22 17:19:24 +02:00
Fabio Manganiello 374f936c1f
Merged `network_stats` into `NetworkInterface` model. 2023-04-22 17:19:24 +02:00
Fabio Manganiello e213941791
s/net_io_counters/network_info/g 2023-04-22 17:19:23 +02:00
Fabio Manganiello 977b55dea9
Merged network addresses into `NetworkInterface` model. 2023-04-22 17:19:23 +02:00
Fabio Manganiello ebe79ac29a
Refactored system schema dataclasses.
- `percent_field` should be declared on `platypush.schemas.dataclasses`
  level, since it's not specific to the `system` plugin.
- Added a common `SystemBaseSchema` that takes care of calling
  `_asdict()` if the object is passed as a `psutil` object instead of a
  dict.
2023-04-22 17:19:23 +02:00
Fabio Manganiello b3a0896485
Converted `NetworkConnection` schema/response. 2023-04-22 17:19:22 +02:00
Fabio Manganiello 98a300c4b1
Added `NetworkInterface` entities to `system` plugin.
Plus, `platypush.schemas.system` has now been split into multiple
submodules to avoid a single-file mega-module with all the system
schemas definitions.
2023-04-21 00:45:15 +02:00
Fabio Manganiello 44b8fd4b34
Support for `disk` entities in the `system` integration. 2023-04-20 16:26:51 +02:00
Fabio Manganiello 153d03d43f
Moved CPU percentage on the level of the CPU entity instead of a child entity. 2023-04-19 01:48:05 +02:00
Fabio Manganiello 4ebfbf3851
Added memory stats entities. 2023-04-19 01:31:11 +02:00
Fabio Manganiello 0073239a40
Support for CPU `load_average` entity. 2023-04-18 18:26:02 +02:00
Fabio Manganiello 1cee0459cf
Added `CpuFrequency` entity to `system`. 2023-04-18 01:49:36 +02:00
Fabio Manganiello a5b0a524f6
Added `CpuStats` entity to `system`. 2023-04-18 01:19:06 +02:00
Fabio Manganiello b4fbd3e915
Added `percent` entity to `cpu`. 2023-04-17 02:25:04 +02:00
Fabio Manganiello b9286f50b0
Added support for `CpuTimes` as an entity of the `system` plugin.
Also, there is now a single `Cpu` entity being exported, with a nested
hierarchy structured like:

```
cpu
  -> cpu_info
  -> cpu_times
    -> idle
    -> user
    -> system
    -> ...
  -> cpu_load
    -> ...
```
2023-04-17 02:25:03 +02:00
Fabio Manganiello b43017ef01
Refactoring the `system` plugin to support entities. 2023-04-17 02:25:02 +02:00
Fabio Manganiello 3bfc5b83ef Moved to manifest files for describing plugins and backends and their dependencies 2021-09-16 17:53:40 +02:00
Fabio Manganiello 35cefcc9f5 Improved consistency and robustness of sensors backend 2020-01-08 22:58:24 +01:00
Fabio Manganiello 9d592fe370 Added battery sensor backend 2020-01-08 14:55:58 +01:00
Fabio Manganiello aa6bf5379a Added process management actions 2020-01-08 00:07:15 +01:00
Fabio Manganiello c53dfab246 Added pid_exists action 2020-01-07 23:03:30 +01:00
Fabio Manganiello 8fe34d541b Added system monitor integration - closes #98 2020-01-07 22:44:59 +01:00