Commit graph

4046 commits

Author SHA1 Message Date
1b6e9b4df9
Fixed a broken docstring reference. 2023-10-10 22:18:36 +02:00
ff07623803
Auto-focus the first parameter after selecting an action. 2023-10-10 21:31:14 +02:00
07f0535504
Migrated Execute panel to the new Autocomplete widget. 2023-10-10 21:13:54 +02:00
a717235453
Added autofocus support to Autocomplete element. 2023-10-10 20:51:09 +02:00
923eb7cadb
Autocomplete is now its own component. 2023-10-10 18:42:41 +02:00
f6bf9438b9
Several improvements for the Execute panel. 2023-10-10 01:45:35 +02:00
434855ffdd
A better logic to process relative references in docstrings. 2023-10-10 01:35:37 +02:00
5726c6985f
Added utility function to get the defining class of a method. 2023-10-10 01:35:01 +02:00
2af304f478
Replaced radio buttons on the Execute panel with buttons. 2023-10-10 00:40:20 +02:00
84efef710e
Added Tabs and Tab UI elements. 2023-10-10 00:39:27 +02:00
0c818d3fe0
.. schema:: JSON arguments should be comma-separated. 2023-10-10 00:38:23 +02:00
b225b056b0
ParseContext should also process kwonlyargs. 2023-10-10 00:37:08 +02:00
52e353dc14
Expose the wrapped function in @action.
Added a `wrapped` "hidden" parameter to the function returned by the
`@action` decorator.

We need this to access the underlying decorated function when e.g. we
need to access its specs or decorators.
2023-10-09 22:35:08 +02:00
1e93af86f4
Fixed some broken docstring references. 2023-10-09 01:33:45 +02:00
53bdcb9604
A major rewrite of the inspect plugin.
- The `inspect` plugin and the Sphinx inspection extensions now use the
  same underlying logic.

- Moved all the common inspection logic under
  `platypush.common.reflection`.

- Faster scanning of the available integrations and components through a
  pool of threads.

- Added `doc_url` parameters.

- Migrated events and responses metadata scanning logic.

- Now expanding some custom Sphinx tag instead of returning errors when
  running outside of the Sphinx context - it includes `:class:`,
  `:meth:` and `.. schema::`.
2023-10-09 01:33:45 +02:00
9acd71944c
Skip numpy types serialization errors on Message.Encoder. 2023-10-09 01:33:45 +02:00
e5a5ac5ffb
Added doc_url parameter to integration metadata. 2023-10-09 01:33:45 +02:00
d872835093
New API to check if a table class exists before defining it.
- Check if it's part of the metadata through a function call rather than
  checking `Base.metadata` in every single module.

- Make it possible to override them (mostly for doc generation logic
  that needs to be able to import those classes).

- Make it possible to extend them.
2023-10-09 01:33:44 +02:00
608844ca0c
[WIP] Large refactor of the inspection plugin and models. 2023-10-09 01:33:44 +02:00
841643f3ff
Added cachedir to configuration. 2023-10-09 01:33:44 +02:00
40557f5d5d
Replaced one more occurrence of <type> | None syntax. 2023-10-09 01:33:44 +02:00
4da3c13976
First WIP commit for the new Integrations panel. 2023-10-09 01:33:44 +02:00
4d52fd35b9
Skip None responses in the RSS plugin. 2023-10-04 22:08:11 +02:00
40d3ad1150
Removed <type> | None type hints.
They break on Python < 3.10.
2023-10-03 01:15:13 +02:00
fd7037d048
Added git checkout and rebase commands to sync-stable-branch step. 2023-10-01 23:31:46 +02:00
ae66e9c205 Merge pull request '[#317] Added Drone step to sync the stable branch on tag' (#332) from 317-ci-cd-automation-for-stable-branch into master
Reviewed-on: platypush/platypush#332
2023-10-01 23:19:22 +02:00
98b51362e9
[#317] Added Drone step to sync the stable branch on tag.
Closes: #317
2023-10-01 23:17:53 +02:00
3086dd86fc
LINT+Black+stability fixes for some plugins that hadn't been touched in a while.
- media.mplayer
- media.omxplayer
- media.vlc
- music.mpd
- music.snapcast
2023-10-01 22:55:06 +02:00
2aefc4e5c8
Several improvements for the Google integrations.
1. Improved documentation. Every plugin now reports the exact steps to
   get the integration up and running with the right API scopes.

2. All Google plugins now have a standard process to get (and reuse) the
   client secret. Except for PubSub, Translate and Maps (which have
   their own flows), all the Google plugins now read the client secrets
   from `<WORKDIR>/credentials/google/client_secret.json` by default.

3. Black/LINT for some of those plugins, which hadn't been touched in a
   while.

4. The interface to pass API scopes is now leaner. It's now possible to
   pass a scope directly as e.g. `calendar.readonly` rather than
   `https://www.googleapis.com/auth/calendar.readonly`.

5. Improved the logic to retrieve the right scope tokens file. If e.g.
   an integration requires the role `A`, and a credentials file exists
   for the roles `A` and `B`, then this file will be used rather than
   prompting the user to authenticate again.
2023-10-01 15:37:20 +02:00
5ca3757834
A more readable configuration for the calendar plugin.
The old type configuration
(`platypush.plugins.calendar.name.CalendarNamePlugin`) is a bit clunky.

Instead, since the type will always be a plugin, we should encourage
the use of `calendar.name` directly to identify the type.
2023-10-01 01:09:15 +02:00
966a6ce29e
httplib2 should be an explicit dependency for Google integrations.
Plus, some misc LINT/Black chores.
2023-10-01 00:52:59 +02:00
a7bb81553c
Regex fix. 2023-09-30 15:11:09 +02:00
9e489bb5cf
Propagate the default/required properties of a parameter upon merge. 2023-09-30 14:57:11 +02:00
1732bfa82c
Fixed _default_docstring regex. 2023-09-30 14:36:08 +02:00
532f5479b3
Added full YAML example for chat.irc configuration. 2023-09-30 14:34:54 +02:00
ecffbf29bf
Skip vararg/varkw parameters from the config snippet. 2023-09-30 13:53:33 +02:00
acb40bd5fd
The test step should also install all dependencies via apk add. 2023-09-30 13:36:28 +02:00
4f5ccda353
Better documentation for the calendar plugin. 2023-09-30 13:31:41 +02:00
7bd721e6a4
Added missing pip install parameter. 2023-09-30 13:31:04 +02:00
c82f7bbfbe
Ignore the default docstring text for __init__.
If no docstring is specified for a constructor, Python usually pre-fills
a standard text - "Initialize self. See help(type(self))".

We don't need this default text in our plugins documentation.
2023-09-30 13:29:49 +02:00
d030e2b8c7
Install all the deps via apk add on Alpine in the build-docs step. 2023-09-30 13:29:10 +02:00
15d06fa5c2
Improved docstring parser logic. 2023-09-30 12:35:31 +02:00
e6f05dfe07 Merge pull request '[#311] Logic to automatically generate the documentation for the dependencies of the integrations' (#330) from 311/auto-generate-deps-docs into master
Reviewed-on: platypush/platypush#330
2023-09-30 02:31:43 +02:00
343972b520
New IntegrationMetadata generic util class.
This object is in charge of parsing all the metadata of a
plugin/backend.
2023-09-30 02:28:20 +02:00
905d6632e0
Misc documentation improvements. 2023-09-29 18:09:15 +02:00
0a3ec4b9f1
Merge branch 'master' into 311/auto-generate-deps-docs 2023-09-28 01:25:29 +02:00
5025d892be
Added install/ subfolders to package_data 2023-09-28 01:25:01 +02:00
b76f141b61
Catch response write errors in the MQTT callback.
If the client that forwarded the request is no longer available (either
because an exception or a timeout was raised) then its I/O buffer and
event loop may be closed.

In this case, the response callback should handle and report the
exception, and still set the event, so that any other threads waiting
for the response can move on.
2023-09-27 11:23:55 +02:00
ca7f042ccc
We shouldn't call dateutil.parser if t has already been deserialized to a datetime. 2023-09-27 11:20:10 +02:00
c311987741
Removed typing.Final from some of the most commonly used modules.
`typing.Final` is not defined on Python < 3.8.
2023-09-26 23:50:10 +02:00