Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable GUI module resource file resolution #177

Merged
merged 13 commits into from
Jul 6, 2023
Merged

Conversation

NeonDaniel
Copy link
Member

@NeonDaniel NeonDaniel commented Jul 5, 2023

Refactors GUIInterface to send page_names containing GUI resource IDs
Adds unit tests for GUIInterface methods and updates docstrings
Refactors messagebus API to upload files as encoded binary for non-text resource support
Refactors GUIInterface to track page id's instead of file paths in the internal pages property

Description of new behavior:

  • Previously, GUIInterface was responsible for resolving an absolute file path for a requested resource and sending lists of paths to the GUI module. This behavior remains for backwards-compat. but should be considered deprecated.
  • GUIInterface now deals with page_name as an identifier, like other resources (i.e. gui_page -> gui_page.qt as stop -> stop.voc).
  • .qml extensions are removed for backwards-compat with skills that request page names following the current syntax.
  • ui_directories now supports a special case all key which should contain a directory with subdirectories for each supported gui framework (i.e. qt5, qt6).

    The recommended structure for skills is {root}/gui/qt5, {root}/gui/qt6, {root}/gui/common.

  • gui.page.show and gui.page.delete messages now include page_names data which is a list of pages by ID, so the GUI module can handle requests per-client/framework. page keys remain for backwards-compat. but will be removed in the future since the paths contained there are framework-specific

… IDs

Adds unit tests for `GUIInterface` methods and updates docstrings
@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Merging #177 (62e4cca) into dev (ca88e1e) will increase coverage by 1.10%.
The diff coverage is 83.63%.

❗ Current head 62e4cca differs from pull request most recent head 78de0c0. Consider uploading reports for the commit 78de0c0 to get more accurate results

@@            Coverage Diff             @@
##              dev     #177      +/-   ##
==========================================
+ Coverage   26.56%   27.66%   +1.10%     
==========================================
  Files          49       49              
  Lines        6419     6456      +37     
==========================================
+ Hits         1705     1786      +81     
+ Misses       4714     4670      -44     
Impacted Files Coverage Δ
ovos_utils/version.py 0.00% <0.00%> (ø)
ovos_utils/gui.py 46.97% <85.18%> (+9.16%) ⬆️

... and 2 files with indirect coverage changes

ovos_utils/gui.py Outdated Show resolved Hide resolved
@NeonDaniel NeonDaniel requested a review from JarbasAl July 6, 2023 15:47
@NeonDaniel NeonDaniel marked this pull request as ready for review July 6, 2023 15:47
ovos_utils/gui.py Outdated Show resolved Hide resolved
@NeonDaniel NeonDaniel requested a review from JarbasAl July 6, 2023 16:19
@NeonDaniel NeonDaniel marked this pull request as draft July 6, 2023 16:26
Add unit tests for `get_ui_directories`
Update default GUI path to support available `all` directory
@NeonDaniel NeonDaniel marked this pull request as ready for review July 6, 2023 16:41
ovos_utils/gui.py Outdated Show resolved Hide resolved
@JarbasAl JarbasAl merged commit a4ef6ae into dev Jul 6, 2023
9 checks passed
@JarbasAl JarbasAl deleted the FEAT_GuiSendPageIDs branch July 6, 2023 17:02
@github-actions github-actions bot mentioned this pull request Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants