- Updated docs.

- Implemented synchronous behaviour (without background process and stdout/stderr log files) for `platyvenv start`.
This commit is contained in:
Fabio Manganiello 2021-09-16 23:28:00 +02:00
parent 2b5698bdfe
commit fa11b13638
8 changed files with 39 additions and 18 deletions

View File

@ -3,6 +3,29 @@
All notable changes to this project will be documented in this file. 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. 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/<env>/logs/<stdout|stderr>.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 ## [0.21.4] - 2021-08-24
### Fixed ### Fixed

View File

@ -117,7 +117,6 @@ function start {
env=$1 env=$1
envdir="${workdir}/${env}" envdir="${workdir}/${env}"
logsdir="${envdir}/var/log/platypush"
rundir="${envdir}/var/run" rundir="${envdir}/var/run"
pidfile="${rundir}/platypush.pid" pidfile="${rundir}/platypush.pid"
cfgfile="${envdir}/etc/platypush/config.yaml" cfgfile="${envdir}/etc/platypush/config.yaml"
@ -127,7 +126,6 @@ function start {
exit 1 exit 1
fi fi
mkdir -p "${logsdir}"
mkdir -p "${rundir}" mkdir -p "${rundir}"
if [[ -f "$pidfile" ]]; then if [[ -f "$pidfile" ]]; then
@ -143,7 +141,7 @@ function start {
python3 -m venv "${envdir}" python3 -m venv "${envdir}"
cd "${envdir}" || exit 1 cd "${envdir}" || exit 1
source bin/activate 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') start_time=$(date +'%s')
timeout=30 timeout=30
@ -162,7 +160,9 @@ function start {
pid=$(cat "$pidfile") pid=$(cat "$pidfile")
echo 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 { function stop {

View File

@ -62,7 +62,7 @@ Backends
platypush/backend/sensor.leap.rst platypush/backend/sensor.leap.rst
platypush/backend/sensor.ltr559.rst platypush/backend/sensor.ltr559.rst
platypush/backend/sensor.mcp3008.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/sensor.serial.rst
platypush/backend/stt.deepspeech.rst platypush/backend/stt.deepspeech.rst
platypush/backend/stt.picovoice.hotword.rst platypush/backend/stt.picovoice.hotword.rst

View File

@ -0,0 +1,5 @@
``sensor.motion.pmw3901``
=========================
.. automodule:: platypush.backend.sensor.motion.pmw3901
:members:

View File

@ -1,5 +0,0 @@
``sensor.motion.pwm3901``
===========================================
.. automodule:: platypush.backend.sensor.motion.pwm3901
:members:

View File

@ -0,0 +1,5 @@
``gpio.sensor.motion.pmw3901``
==============================
.. automodule:: platypush.plugins.gpio.sensor.motion.pmw3901
:members:

View File

@ -1,6 +0,0 @@
``gpio.sensor.motion.pwm3901``
================================================
.. automodule:: platypush.plugins.gpio.sensor.motion.pwm3901
:members:

View File

@ -52,10 +52,9 @@ Plugins
platypush/plugins/gpio.sensor.envirophat.rst platypush/plugins/gpio.sensor.envirophat.rst
platypush/plugins/gpio.sensor.ltr559.rst platypush/plugins/gpio.sensor.ltr559.rst
platypush/plugins/gpio.sensor.mcp3008.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/gpio.zeroborg.rst
platypush/plugins/graphite.rst platypush/plugins/graphite.rst
platypush/plugins/homeseer.rst
platypush/plugins/http.request.rst platypush/plugins/http.request.rst
platypush/plugins/http.request.rss.rst platypush/plugins/http.request.rss.rst
platypush/plugins/http.webpage.rst platypush/plugins/http.webpage.rst