Skip to content

Commit

Permalink
Merge pull request #45 from OpenVoiceOS/dev
Browse files Browse the repository at this point in the history
0.1.0
  • Loading branch information
JarbasAl authored Sep 10, 2024
2 parents c331bbb + 2085be9 commit af32fba
Show file tree
Hide file tree
Showing 19 changed files with 582 additions and 436 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
42 changes: 42 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Run CodeCov
on:
push:
branches:
- dev
workflow_dispatch:

jobs:
run:
runs-on: ubuntu-latest
env:
PYTHON: '3.9'
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.9
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt install python3-dev libssl-dev
python -m pip install build wheel
- name: Install test dependencies
run: |
pip install -r test/requirements.txt
- name: Install core repo
run: |
pip install -e .
- name: Generate coverage report
run: |
pytest --cov=ovos_gui --cov-report xml test/unittests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
fail_ci_if_error: true
files: ./coverage.xml,!./cache
flags: unittests
name: codecov-umbrella
verbose: true
77 changes: 33 additions & 44 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,88 +1,77 @@
# Changelog

## [0.0.3a11](https://github.com/OpenVoiceOS/ovos-gui/tree/0.0.3a11) (2023-07-20)
## [0.2.0](https://github.com/OpenVoiceOS/ovos-gui/tree/0.2.0) (2024-09-02)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.0.3a10...0.0.3a11)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.1.0a2...0.2.0)

**Merged pull requests:**

- Add description to setup.py to fix \#21 [\#22](https://github.com/OpenVoiceOS/ovos-gui/pull/22) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.0.3a10](https://github.com/OpenVoiceOS/ovos-gui/tree/0.0.3a10) (2023-07-20)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/V0.0.3a9...0.0.3a10)

**Merged pull requests:**
**Fixed bugs:**

- Update automation to current standards [\#21](https://github.com/OpenVoiceOS/ovos-gui/pull/21) ([NeonDaniel](https://github.com/NeonDaniel))
- Stuck on OVOS logo [\#42](https://github.com/OpenVoiceOS/ovos-gui/issues/42)

## [V0.0.3a9](https://github.com/OpenVoiceOS/ovos-gui/tree/V0.0.3a9) (2023-07-19)
**Closed issues:**

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/V0.0.3a8...V0.0.3a9)
- Gui roadmap [\#2](https://github.com/OpenVoiceOS/ovos-gui/issues/2)

**Merged pull requests:**
## [0.1.0a2](https://github.com/OpenVoiceOS/ovos-gui/tree/0.1.0a2) (2024-02-08)

- Fix local system resource resolution [\#20](https://github.com/OpenVoiceOS/ovos-gui/pull/20) ([NeonDaniel](https://github.com/NeonDaniel))
[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.0.4a5...0.1.0a2)

## [V0.0.3a8](https://github.com/OpenVoiceOS/ovos-gui/tree/V0.0.3a8) (2023-07-08)
**Implemented enhancements:**

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/V0.0.3a7...V0.0.3a8)
- house cleaning [\#39](https://github.com/OpenVoiceOS/ovos-gui/pull/39) ([NeonJarbas](https://github.com/NeonJarbas))

**Implemented enhancements:**
## [0.0.4a5](https://github.com/OpenVoiceOS/ovos-gui/tree/0.0.4a5) (2023-12-29)

- GUI File Server and Alternate GUI Framework Support [\#9](https://github.com/OpenVoiceOS/ovos-gui/pull/9) ([JarbasAl](https://github.com/JarbasAl))
[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.0.4a4...0.0.4a5)

## [V0.0.3a7](https://github.com/OpenVoiceOS/ovos-gui/tree/V0.0.3a7) (2023-07-04)
**Closed issues:**

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/V0.0.3a6...V0.0.3a7)
- "OSError: \[Errno 98\] Address already in use" when restarted too fast [\#24](https://github.com/OpenVoiceOS/ovos-gui/issues/24)

**Merged pull requests:**

- Update dependencies to stable versions [\#16](https://github.com/OpenVoiceOS/ovos-gui/pull/16) ([NeonDaniel](https://github.com/NeonDaniel))
- Update requirements.txt [\#33](https://github.com/OpenVoiceOS/ovos-gui/pull/33) ([JarbasAl](https://github.com/JarbasAl))

## [V0.0.3a6](https://github.com/OpenVoiceOS/ovos-gui/tree/V0.0.3a6) (2023-06-23)
## [0.0.4a4](https://github.com/OpenVoiceOS/ovos-gui/tree/0.0.4a4) (2023-10-06)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/V0.0.3a5...V0.0.3a6)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.0.4a3...0.0.4a4)

**Merged pull requests:**

- Unit Tests and Documentation [\#15](https://github.com/OpenVoiceOS/ovos-gui/pull/15) ([NeonDaniel](https://github.com/NeonDaniel))

## [V0.0.3a5](https://github.com/OpenVoiceOS/ovos-gui/tree/V0.0.3a5) (2023-06-13)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/V0.0.3a4...V0.0.3a5)
- Update protocol.md [\#32](https://github.com/OpenVoiceOS/ovos-gui/pull/32) ([JarbasAl](https://github.com/JarbasAl))

**Merged pull requests:**
## [0.0.4a3](https://github.com/OpenVoiceOS/ovos-gui/tree/0.0.4a3) (2023-09-29)

- Remove unused ovos-backend-client dependency [\#14](https://github.com/OpenVoiceOS/ovos-gui/pull/14) ([NeonDaniel](https://github.com/NeonDaniel))
[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.0.4a2...0.0.4a3)

## [V0.0.3a4](https://github.com/OpenVoiceOS/ovos-gui/tree/V0.0.3a4) (2023-06-09)
**Fixed bugs:**

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/V0.0.3a3...V0.0.3a4)
- Refactor skills status check to resolve init bug [\#31](https://github.com/OpenVoiceOS/ovos-gui/pull/31) ([NeonDaniel](https://github.com/NeonDaniel))

**Merged pull requests:**
**Closed issues:**

- Minor logging and method annotation changes [\#13](https://github.com/OpenVoiceOS/ovos-gui/pull/13) ([NeonDaniel](https://github.com/NeonDaniel))
- You must execute run\_forever\(\) before emitting messages [\#30](https://github.com/OpenVoiceOS/ovos-gui/issues/30)

## [V0.0.3a3](https://github.com/OpenVoiceOS/ovos-gui/tree/V0.0.3a3) (2023-06-09)
## [0.0.4a2](https://github.com/OpenVoiceOS/ovos-gui/tree/0.0.4a2) (2023-09-29)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/V0.0.3a2...V0.0.3a3)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.0.4a1...0.0.4a2)

**Implemented enhancements:**

- :tada: - GUI plugin [\#11](https://github.com/OpenVoiceOS/ovos-gui/pull/11) ([JarbasAl](https://github.com/JarbasAl))
- Add option to use host paths in containers in addition to http URLs [\#25](https://github.com/OpenVoiceOS/ovos-gui/pull/25) ([NeonDaniel](https://github.com/NeonDaniel))

## [V0.0.3a2](https://github.com/OpenVoiceOS/ovos-gui/tree/V0.0.3a2) (2023-05-01)
## [0.0.4a1](https://github.com/OpenVoiceOS/ovos-gui/tree/0.0.4a1) (2023-09-28)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/V0.0.3a1...V0.0.3a2)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/0.0.3...0.0.4a1)

**Fixed bugs:**

- interfaces/ folder not getting packaged [\#8](https://github.com/OpenVoiceOS/ovos-gui/issues/8)
- ovos-core must be restarted to re-upload QML files [\#28](https://github.com/OpenVoiceOS/ovos-gui/issues/28)
- Check if Skills service is running on GUI service init [\#29](https://github.com/OpenVoiceOS/ovos-gui/pull/29) ([NeonDaniel](https://github.com/NeonDaniel))

## [V0.0.3a1](https://github.com/OpenVoiceOS/ovos-gui/tree/V0.0.3a1) (2023-04-30)
**Merged pull requests:**

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui/compare/V0.0.2...V0.0.3a1)
- add plugins to readme [\#27](https://github.com/OpenVoiceOS/ovos-gui/pull/27) ([JarbasAl](https://github.com/JarbasAl))



Expand Down
35 changes: 26 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ GUI messagebus service, manages GUI state and implements the [gui protocol](./pr
GUI clients (the application that actually draws the GUI) connect to this service


# Plugins

plugins provide platform specific GUI functionality, such as determining when to show a homescreen or close a window

you should usually not need any of these unless instructed to install it from a GUI client application

- https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion
- https://github.com/OpenVoiceOS/ovos-gui-plugin-mobile
- https://github.com/OpenVoiceOS/ovos-gui-plugin-plasmoid
- https://github.com/OpenVoiceOS/ovos-gui-plugin-bigscreen

# Configuration

under mycroft.conf
Expand All @@ -16,22 +27,28 @@ under mycroft.conf
// Uncomment or add "idle_display_skill" to set initial homescreen
// "idle_display_skill": "skill-ovos-homescreen.openvoiceos",

// Extensions provide additional GUI platform support for specific devices
// Currently supported devices: smartspeaker, bigscreen or generic
// Extensions are plugins that provide additional GUI platform support for specific devices
// eg, if using ovos-shell you should set extension to "ovos-gui-plugin-shell-companion"
"extension": "generic",

// Generic extension can additionaly provide homescreen functionality
// homescreen support is disabled by default for generic extension
// Default generic extension can provide homescreen functionality if enabled
"generic": {
"homescreen_supported": false
}
},

// Optional file server support for remote clients
// "gui_file_server": true,
// "file_server_port": 8000,

// Optionally specify a default qt version for connected clients
// "default_qt_version": 5,

// Optional support for collecting GUI files for container support
// The ovos-gui container path for these files will be {XDG_CACHE_HOME}/ovos_gui_file_server.
// With the below configuration, the GUI client will have files prefixed with the configured host path,
// so the example below describes a situation where `{XDG_CACHE_HOME}/ovos_gui_file_server` maps
// to `/tmp/gui_files` on the filesystem where the GUI client is running.
// "gui_file_host_path": "/tmp/gui_files",

// Optionally specify a default qt version for connected clients that don't report it
"default_qt_version": 5
},

// The GUI messagebus websocket. Once port is created per connected GUI
Expand All @@ -42,4 +59,4 @@ under mycroft.conf
"ssl": false
}
}
```
```
6 changes: 4 additions & 2 deletions ovos_gui/bus.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ def get_client_pages(self, namespace):
"""
client_pages = []
server_url = self.ns_manager.gui_file_server.url if \
self.ns_manager.gui_file_server else None
self.ns_manager.gui_file_server else \
self.ns_manager.gui_file_host_path
for page in namespace.pages:
uri = page.get_uri(self.framework, server_url)
client_pages.append(uri)
Expand Down Expand Up @@ -260,7 +261,8 @@ def send_gui_pages(self, pages: List[GuiPage], namespace: str,
@param position: position to insert pages at
"""
server_url = self.ns_manager.gui_file_server.url if \
self.ns_manager.gui_file_server else None
self.ns_manager.gui_file_server else \
self.ns_manager.gui_file_host_path
framework = self.framework

message = {
Expand Down
14 changes: 7 additions & 7 deletions ovos_gui/extensions.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
from ovos_bus_client import Message, MessageBusClient
from ovos_config.config import Configuration
from ovos_gui.namespace import NamespaceManager
from ovos_utils.log import LOG
from ovos_plugin_manager.gui import OVOSGuiFactory
from ovos_gui.homescreen import HomescreenManager


class ExtensionsManager:
def __init__(self, name: str, bus: MessageBusClient, gui: NamespaceManager):
def __init__(self, name: str, bus: MessageBusClient):
"""
Constructor for the Extension Manager. The Extension Manager is
responsible for managing the extensions that define additional GUI
behaviours for specific platforms.
@param name: Name of the extension manager
@param bus: MessageBus instance
@param gui: GUI instance
"""

self.name = name
self.bus = bus
self.gui = gui
self.homescreen_manager = HomescreenManager(self.bus)
core_config = Configuration()
enclosure_config = core_config.get("gui") or {}
self.active_extension = enclosure_config.get("extension", "generic")
Expand Down Expand Up @@ -53,10 +52,11 @@ def activate_extension(self, extension_id: str):
f"falling back to 'generic'")
cfg["module"] = "generic"
self.extension = OVOSGuiFactory.create(cfg, bus=self.bus)
self.extension.bind_homescreen()

LOG.info(f"Extensions Manager: Activated Extension {extension_id} "
f"({self.extension.__class__})")
self.extension.bind_homescreen(self.homescreen_manager)

LOG.info(f"Extensions Manager - Activated: {extension_id} "
f"({self.extension.__class__.__name__})")
self.bus.emit(
Message("extension.manager.activated", {"id": extension_id}))

Expand Down
6 changes: 6 additions & 0 deletions ovos_gui/gui_file_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ def end_headers(self) -> None:


def start_gui_http_server(qml_path: str, port: int = None):
"""
Start an http server to host GUI Resources
@param qml_path: Local file path to server
@param port: Host port to run file server on
@return: Initialized HTTP Server
"""
port = port or Configuration().get("gui", {}).get("file_server_port", 8089)

if os.path.exists(qml_path):
Expand Down
Loading

0 comments on commit af32fba

Please sign in to comment.