Commit graph

3657 commits

Author SHA1 Message Date
Fabio Manganiello a3643c285e
[UI] A friendlier representation of an integration's name.
All checks were successful
continuous-integration/drone/push Build is passing
2023-10-14 14:02:17 +02:00
Fabio Manganiello 0aecb50590
[Entities UI] Don't hide variables with null values.
Otherwise, the `variables` panel will still appear, but empty, and
offering no way of actually removing or resetting those variables.
2023-10-14 14:02:17 +02:00
Fabio Manganiello 01c7d230f1
[Entities UI] Added Expand/Collapse and Hide actions to groups.
Also, replaced all the deprecated `::v-deep` SCSS notations with
`:deep`.
2023-10-14 14:02:17 +02:00
Fabio Manganiello dbe19042bc
[Automatic] Updated UI files
All checks were successful
continuous-integration/drone/push Build is passing
2023-10-13 21:13:00 +00:00
Fabio Manganiello 891e05a219
[Execute UI] Added syntax highlight to JSON and shell snippets.
All checks were successful
continuous-integration/drone/push Build is passing
2023-10-13 23:12:04 +02:00
Fabio Manganiello 8b9ac59167
parse_numpy should also catch AttributeError.
All checks were successful
continuous-integration/drone/push Build is passing
2023-10-12 03:24:03 +02:00
Fabio Manganiello 12f38281e1
[Automatic] Updated UI files
All checks were successful
continuous-integration/drone/push Build is passing
2023-10-12 00:58:53 +00:00
Fabio Manganiello e382ad7650 Invert @ensure_initialized and @action annotations.
Otherwise, we won't be able to access the wrapped function from the
inspection logic.
2023-10-12 00:57:31 +00:00
Fabio Manganiello 8ef67012ed [Drone CI] git push in the build-ui step needs a -f flag. 2023-10-12 00:57:31 +00:00
Fabio Manganiello 0a13b4605e
[Execute panel] Procedures merged into actions.
All checks were successful
continuous-integration/drone/push Build is passing
Plus, a last big refactor/redesign for the panel's components.
2023-10-12 02:49:51 +02:00
Fabio Manganiello e760f8e23a
[Execute panel] Introduced a common Response component.
All checks were successful
continuous-integration/drone/push Build is passing
2023-10-11 16:57:04 +02:00
Fabio Manganiello b47e729012
[Execute panel] Added cURL snippet modal.
All checks were successful
continuous-integration/drone/push Build is passing
2023-10-11 16:38:38 +02:00
Fabio Manganiello fc21e9740b
[Execute panel] Better rendering of responses and errors.
Some checks failed
continuous-integration/drone/push Build is failing
2023-10-11 15:28:49 +02:00
Fabio Manganiello 21820bb185
Big refactor of the Execute panel.
Some checks failed
continuous-integration/drone/push Build is failing
2023-10-11 14:31:46 +02:00
Fabio Manganiello 1b6e9b4df9
Fixed a broken docstring reference. 2023-10-10 22:18:36 +02:00
Fabio Manganiello ff07623803
Auto-focus the first parameter after selecting an action. 2023-10-10 21:31:14 +02:00
Fabio Manganiello 07f0535504
Migrated Execute panel to the new Autocomplete widget. 2023-10-10 21:13:54 +02:00
Fabio Manganiello a717235453
Added autofocus support to Autocomplete element. 2023-10-10 20:51:09 +02:00
Fabio Manganiello 923eb7cadb
Autocomplete is now its own component. 2023-10-10 18:42:41 +02:00
Fabio Manganiello f6bf9438b9
Several improvements for the Execute panel. 2023-10-10 01:45:35 +02:00
Fabio Manganiello 434855ffdd
A better logic to process relative references in docstrings. 2023-10-10 01:35:37 +02:00
Fabio Manganiello 5726c6985f
Added utility function to get the defining class of a method. 2023-10-10 01:35:01 +02:00
Fabio Manganiello 2af304f478
Replaced radio buttons on the Execute panel with buttons. 2023-10-10 00:40:20 +02:00
Fabio Manganiello 84efef710e
Added Tabs and Tab UI elements. 2023-10-10 00:39:27 +02:00
Fabio Manganiello 0c818d3fe0
.. schema:: JSON arguments should be comma-separated. 2023-10-10 00:38:23 +02:00
Fabio Manganiello b225b056b0
ParseContext should also process kwonlyargs. 2023-10-10 00:37:08 +02:00
Fabio Manganiello 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
Fabio Manganiello 1e93af86f4
Fixed some broken docstring references.
All checks were successful
continuous-integration/drone/push Build is passing
2023-10-09 01:33:45 +02:00
Fabio Manganiello 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
Fabio Manganiello 9acd71944c
Skip numpy types serialization errors on Message.Encoder. 2023-10-09 01:33:45 +02:00
Fabio Manganiello e5a5ac5ffb
Added doc_url parameter to integration metadata. 2023-10-09 01:33:45 +02:00
Fabio Manganiello 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
Fabio Manganiello 608844ca0c
[WIP] Large refactor of the inspection plugin and models. 2023-10-09 01:33:44 +02:00
Fabio Manganiello 841643f3ff
Added cachedir to configuration. 2023-10-09 01:33:44 +02:00
Fabio Manganiello 40557f5d5d
Replaced one more occurrence of <type> | None syntax. 2023-10-09 01:33:44 +02:00
Fabio Manganiello 4da3c13976
First WIP commit for the new Integrations panel. 2023-10-09 01:33:44 +02:00
Fabio Manganiello 4d52fd35b9
Skip None responses in the RSS plugin.
All checks were successful
continuous-integration/drone/push Build is passing
2023-10-04 22:08:11 +02:00
Fabio Manganiello 40d3ad1150
Removed <type> | None type hints.
All checks were successful
continuous-integration/drone/push Build is passing
They break on Python < 3.10.
2023-10-03 01:15:13 +02:00
Fabio Manganiello fd7037d048
Added git checkout and rebase commands to sync-stable-branch step.
All checks were successful
continuous-integration/drone/push Build is passing
2023-10-01 23:31:46 +02:00
Fabio Manganiello 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
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #332
2023-10-01 23:19:22 +02:00
Fabio Manganiello 98b51362e9
[#317] Added Drone step to sync the stable branch on tag.
All checks were successful
continuous-integration/drone/push Build is passing
Closes: #317
2023-10-01 23:17:53 +02:00
Fabio Manganiello 3086dd86fc
LINT+Black+stability fixes for some plugins that hadn't been touched in a while.
All checks were successful
continuous-integration/drone/push Build is passing
- media.mplayer
- media.omxplayer
- media.vlc
- music.mpd
- music.snapcast
2023-10-01 22:55:06 +02:00
Fabio Manganiello 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
Fabio Manganiello 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
Fabio Manganiello 966a6ce29e
httplib2 should be an explicit dependency for Google integrations.
Plus, some misc LINT/Black chores.
2023-10-01 00:52:59 +02:00
Fabio Manganiello a7bb81553c
Regex fix.
All checks were successful
continuous-integration/drone/push Build is passing
2023-09-30 15:11:09 +02:00
Fabio Manganiello 9e489bb5cf
Propagate the default/required properties of a parameter upon merge.
All checks were successful
continuous-integration/drone/push Build is passing
2023-09-30 14:57:11 +02:00
Fabio Manganiello 1732bfa82c
Fixed _default_docstring regex. 2023-09-30 14:36:08 +02:00
Fabio Manganiello 532f5479b3
Added full YAML example for chat.irc configuration. 2023-09-30 14:34:54 +02:00
Fabio Manganiello ecffbf29bf
Skip vararg/varkw parameters from the config snippet.
All checks were successful
continuous-integration/drone/push Build is passing
2023-09-30 13:53:33 +02:00