From fa11b1363811a5253ff366096e59fe5caf0ceb80 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 16 Sep 2021 23:28:00 +0200 Subject: [PATCH] - Updated docs. - Implemented synchronous behaviour (without background process and stdout/stderr log files) for `platyvenv start`. --- CHANGELOG.md | 23 +++++++++++++++++++ bin/platyvenv | 8 +++---- docs/source/backends.rst | 2 +- .../backend/sensor.motion.pmw3901.rst | 5 ++++ .../backend/sensor.motion.pwm3901.rst | 5 ---- .../plugins/gpio.sensor.motion.pmw3901.rst | 5 ++++ .../plugins/gpio.sensor.motion.pwm3901.rst | 6 ----- docs/source/plugins.rst | 3 +-- 8 files changed, 39 insertions(+), 18 deletions(-) create mode 100644 docs/source/platypush/backend/sensor.motion.pmw3901.rst delete mode 100644 docs/source/platypush/backend/sensor.motion.pwm3901.rst create mode 100644 docs/source/platypush/plugins/gpio.sensor.motion.pmw3901.rst delete mode 100644 docs/source/platypush/plugins/gpio.sensor.motion.pwm3901.rst diff --git a/CHANGELOG.md b/CHANGELOG.md index 31f1f2fcbd..655ab7abf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,29 @@ All notable changes to this project will be documented in this file. Given the high speed of development in the first phase, changes are being reported only starting from v0.20.2. +## [0.22.0] - 2021-09-16 + +### Changed + +- Platypush now uses manifest files to describe plugins and backends. Each extension is now + expected to provide a `manifest.yaml` file in its folder, reporting its package name, pip + dependencies, required system packages and optional extra installation commands. + +- Refactored `platyvenv`, `platydock`, documentation generation and plugin management engine. + They are now both faster and more robust, since they can rely on the manifest definition to + operate instead of pydoc strings conventions or `config.yaml` conventions. + +- `platyvenv start` now starts the environment process synchronously and it prints + stdout/stderr instead of redirecting it to the logs dir (previous behaviour: + `platyvenv start` used to start the process asynchronously and the logs were stored + to `~/.local/share/platypush/venv//logs/.log`). + +### Removed + +- Removed `Homeseer` integration - it was based on a Python integration that has now been + pulled out of PyPI and GitHub. A new integration may come in the future if there is enough + demand for it. + ## [0.21.4] - 2021-08-24 ### Fixed diff --git a/bin/platyvenv b/bin/platyvenv index 4e1d33ab4e..1b0d27de7f 100755 --- a/bin/platyvenv +++ b/bin/platyvenv @@ -117,7 +117,6 @@ function start { env=$1 envdir="${workdir}/${env}" - logsdir="${envdir}/var/log/platypush" rundir="${envdir}/var/run" pidfile="${rundir}/platypush.pid" cfgfile="${envdir}/etc/platypush/config.yaml" @@ -127,7 +126,6 @@ function start { exit 1 fi - mkdir -p "${logsdir}" mkdir -p "${rundir}" if [[ -f "$pidfile" ]]; then @@ -143,7 +141,7 @@ function start { python3 -m venv "${envdir}" cd "${envdir}" || exit 1 source bin/activate - bin/platypush -c "$cfgfile" -P "$pidfile" > "${logsdir}/stdout.log" 2> "${logsdir}/stderr.log" & + bin/platypush -c "$cfgfile" -P "$pidfile" & start_time=$(date +'%s') timeout=30 @@ -162,7 +160,9 @@ function start { pid=$(cat "$pidfile") echo - echo "Platypush environment $env started with PID $pid, logs dir: $logsdir" + echo "Platypush environment $env started with PID $pid" + wait "${pid}" + echo "Platypush environment $env terminated" } function stop { diff --git a/docs/source/backends.rst b/docs/source/backends.rst index 5e8930919e..585a8114f2 100644 --- a/docs/source/backends.rst +++ b/docs/source/backends.rst @@ -62,7 +62,7 @@ Backends platypush/backend/sensor.leap.rst platypush/backend/sensor.ltr559.rst platypush/backend/sensor.mcp3008.rst - platypush/backend/sensor.motion.pwm3901.rst + platypush/backend/sensor.motion.pmw3901.rst platypush/backend/sensor.serial.rst platypush/backend/stt.deepspeech.rst platypush/backend/stt.picovoice.hotword.rst diff --git a/docs/source/platypush/backend/sensor.motion.pmw3901.rst b/docs/source/platypush/backend/sensor.motion.pmw3901.rst new file mode 100644 index 0000000000..350385b92f --- /dev/null +++ b/docs/source/platypush/backend/sensor.motion.pmw3901.rst @@ -0,0 +1,5 @@ +``sensor.motion.pmw3901`` +========================= + +.. automodule:: platypush.backend.sensor.motion.pmw3901 + :members: diff --git a/docs/source/platypush/backend/sensor.motion.pwm3901.rst b/docs/source/platypush/backend/sensor.motion.pwm3901.rst deleted file mode 100644 index ae331b9e65..0000000000 --- a/docs/source/platypush/backend/sensor.motion.pwm3901.rst +++ /dev/null @@ -1,5 +0,0 @@ -``sensor.motion.pwm3901`` -=========================================== - -.. automodule:: platypush.backend.sensor.motion.pwm3901 - :members: diff --git a/docs/source/platypush/plugins/gpio.sensor.motion.pmw3901.rst b/docs/source/platypush/plugins/gpio.sensor.motion.pmw3901.rst new file mode 100644 index 0000000000..d199d29e07 --- /dev/null +++ b/docs/source/platypush/plugins/gpio.sensor.motion.pmw3901.rst @@ -0,0 +1,5 @@ +``gpio.sensor.motion.pmw3901`` +============================== + +.. automodule:: platypush.plugins.gpio.sensor.motion.pmw3901 + :members: diff --git a/docs/source/platypush/plugins/gpio.sensor.motion.pwm3901.rst b/docs/source/platypush/plugins/gpio.sensor.motion.pwm3901.rst deleted file mode 100644 index bb8b5e0283..0000000000 --- a/docs/source/platypush/plugins/gpio.sensor.motion.pwm3901.rst +++ /dev/null @@ -1,6 +0,0 @@ -``gpio.sensor.motion.pwm3901`` -================================================ - -.. automodule:: platypush.plugins.gpio.sensor.motion.pwm3901 - :members: - diff --git a/docs/source/plugins.rst b/docs/source/plugins.rst index b05de14012..786ea7186f 100644 --- a/docs/source/plugins.rst +++ b/docs/source/plugins.rst @@ -52,10 +52,9 @@ Plugins platypush/plugins/gpio.sensor.envirophat.rst platypush/plugins/gpio.sensor.ltr559.rst platypush/plugins/gpio.sensor.mcp3008.rst - platypush/plugins/gpio.sensor.motion.pwm3901.rst + platypush/plugins/gpio.sensor.motion.pmw3901.rst platypush/plugins/gpio.zeroborg.rst platypush/plugins/graphite.rst - platypush/plugins/homeseer.rst platypush/plugins/http.request.rst platypush/plugins/http.request.rss.rst platypush/plugins/http.webpage.rst