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

feat(core): use new SpinnerWidget of ubo-gui to show unknown progress in notifications, and add General sub menu to System settings menu to host ubo-pod/ubo-app related settings, currently it has Debug toggle to control a debug feature of HeadlessWidget - closes #190 #189

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/integration_delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@ jobs:
- uses: actions/checkout@v4
name: Checkout

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ venv.bak/
*.log
*.log.[0-9]*

# headless-kivy-pi
headless_kivy_pi_buffer.raw
# headless-kivy
headless_kivy*.raw

# packer
scripts/packer/packer_cache/
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- fix(users): avoid setting user as sudoer when it performs a password reset
- feat(ip): use pythonping to perform a real ping test instead to determine the internet connection status instead of opening a socket
- feat(core): user can start/end recording actioning by hitting r, actions will be recorded in `recordings/` directory and the last recording can be replayed by hitting `ctrl+r` - closes #187
- feat(core): use new `SpinnerWidget` of ubo-gui to show unknown progress in notifications, and add `General` sub menu to `System` settings menu to host ubo-pod/ubo-app related settings, currently it has `Debug` toggle to control a debug feature of `HeadlessWidget` - closes #190

## Version 1.0.0

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ requires-python = ">=3.11"
keywords = ['ubo', 'ubo-pod', 'raspberry pi', 'rpi', 'home assistance']
dependencies = [
"psutil >=6.0.0",
"ubo-gui >=0.13.3",
"headless-kivy >=0.9.8",
"ubo-gui >=0.13.7",
"headless-kivy >=0.12.1",
"pyzbar >=0.1.9",
"sdbus-networkmanager >=2.0.0 ; platform_machine=='aarch64'",
"rpi_ws281x >=5.0.0 ; platform_machine=='aarch64'",
Expand Down Expand Up @@ -65,7 +65,7 @@ packages = ["ubo_app"]

[tool.uv]
dev-dependencies = [
"headless-kivy [test] >=0.9.8",
"headless-kivy [test] >=0.12.1",
"poethepoet >=0.24.4",
"pyright >=1.1.377",
"pytest >=8.0.0",
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ function run_on_pod_as_root() {

scp dist/$LATEST_VERSION ubo-development-pod:/tmp/

run_on_pod "$(if [ "$deps" == "True" ]; then echo "pip install --upgrade /tmp/$LATEST_VERSION[default] &&"; fi)
run_on_pod "$(if [ "$deps" == "True" ]; then echo "pip install --upgrade /tmp/$LATEST_VERSION &&"; fi)
mv /opt/ubo/env/lib/python3.*/site-packages/ubo_app/services/*-voice/models /tmp/
pip install --no-index --upgrade --force-reinstal --no-deps /tmp/$LATEST_VERSION[default]
pip install --no-index --upgrade --force-reinstal --no-deps /tmp/$LATEST_VERSION
mv /tmp/models /opt/ubo/env/lib/python3.*/site-packages/ubo_app/services/*-voice/
true"

Expand Down
2 changes: 0 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@

def pytest_addoption(parser: pytest.Parser) -> None:
"""Add options to the pytest command line."""
parser.addoption('--override-window-snapshots', action='store_true')
parser.addoption('--make-screenshots', action='store_true')
parser.addoption('--use-fakefs', action='store_true')


Expand Down
5 changes: 4 additions & 1 deletion tests/fixtures/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ def patched_config_set(category: str, key: str, value: str) -> None:
from kivy.config import Config

Config.set('graphics', 'window_state', 'hidden')
Config.set('graphics', 'fbo', 'force-hardware')
Config.set('graphics', 'fullscreen', '0')
Config.set('graphics', 'multisamples', '1')
Config.set('graphics', 'vsync', '0')

import headless_kivy.config

Expand All @@ -249,7 +253,6 @@ def patched_config_set(category: str, key: str, value: str) -> None:
headless_kivy.config.setup_headless_kivy(
{
'callback': render_on_display,
'automatic_fps': True,
'flip_vertical': True,
'width': WIDTH,
'height': HEIGHT,
Expand Down
8 changes: 1 addition & 7 deletions tests/fixtures/stability.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,7 @@ def check() -> None:
assert is_window_stable, 'The content of the screen is not stable yet'
assert is_store_stable, 'The content of the store is not stable yet'

from headless_kivy import HeadlessWidget, config

headless_widget_instance = HeadlessWidget.get_instance(app_context.app.root)
if headless_widget_instance:
assert (
headless_widget_instance.fps == config.min_fps()
), 'Not in low fps mode'
from headless_kivy import HeadlessWidget

await _run(
initial_wait=initial_wait,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// window-rpi-000
1065fa10934619a40701fb78803e9aabb2a0b798b7f2ac50b1c6150a283dccdf
b3db0573bb0c73f16d0a5e5be0a017c8660a53c687d8559e76814a441db075bd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// window-rpi-001
92b0e1d02d380eb831bcafb57b27c2f2afa023a52a95af44765c17754ca3de38
c680100b9cf09561e1adb62abfa8eb985a00c0468b392a6a1e772921807b5878
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// window-rpi-002
92b0e1d02d380eb831bcafb57b27c2f2afa023a52a95af44765c17754ca3de38
c680100b9cf09561e1adb62abfa8eb985a00c0468b392a6a1e772921807b5878
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// window-rpi-003
f166f0f580b7f33e71abca3d05740a35231e891fa48e8d5c8e1236d92c500340
0f13319443f4340c4fc4b753226ba6e1605e569189dc8d58e403b4bc21c4c32a
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// window-rpi-004
6aa0aa68a5e7047343d85d3099ac0efbbd9ca72399be7959659a4f39fa2009d5
c26e7c4aaeb369597c6cb9426df8f0a5bb6e4fb899dfec04634ff7c2e4b747b1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// window-rpi-005
1501dd2e4901ed86258b63fa459fa9a63dbc88a76e2e7ad26b0f2dee647facda
f2a748ff52bd9c34a298ab624ff9a474ecae5883842941aca8ee9559cd92a6d7
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// window-rpi-006
6aa0aa68a5e7047343d85d3099ac0efbbd9ca72399be7959659a4f39fa2009d5
c26e7c4aaeb369597c6cb9426df8f0a5bb6e4fb899dfec04634ff7c2e4b747b1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// window-rpi-007
65789d796f04d6ca6d3aa84469b18e0907e9938fab1209d6e633974147bce2de
12e31e10eadf55d4b824e563c2c18f2705d7261c6d401b6001d2b2e5ba92c808
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// window-rpi-008
184a835de154aa889f3568f461d4b566e30d304bb808b8065f9a1edbdfb873ca
a47eeb0c63e483413e618f7c05dbcf97e832c945a0282876a4ee8c4b70767227
2 changes: 1 addition & 1 deletion tests/flows/test_wireless.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async def strength() -> int:
)

from ubo_app.menu_app.menu import MenuApp
from ubo_app.store.core import (
from ubo_app.store.core.types import (
MenuChooseByIconAction,
MenuChooseByLabelAction,
MenuGoBackAction,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"main": {
"_type": "MainState",
"depth": 1,
"is_footer_visible": true,
"is_header_visible": true,
"is_recording": false,
"menu": {
"_type": "HeadlessMenu",
Expand Down Expand Up @@ -121,17 +123,61 @@
1,
1
],
"icon": "󰕈",
"icon": "󰒔",
"is_short": false,
"key": "OS",
"label": "OS",
"key": "System",
"label": "System",
"opacity": null,
"progress": null,
"sub_menu": {
"_type": "HeadlessMenu",
"items": [],
"items": [
{
"_type": "SubMenuItem",
"background_color": "#68B7FF",
"color": [
1,
1,
1,
1
],
"icon": "󰒓",
"is_short": false,
"key": "general",
"label": "General",
"opacity": null,
"progress": null,
"sub_menu": {
"_type": "HeadlessMenu",
"items": [
{
"_type": "DispatchItem",
"action": "<function:<lambda>>",
"background_color": "#68B7FF",
"color": [
1,
1,
1,
1
],
"icon": "󰄱",
"is_short": false,
"key": null,
"label": "Debug",
"opacity": null,
"progress": null,
"store_action": {
"_type": "SettingsToggleDebugModeAction"
}
}
],
"placeholder": null,
"title": "󰒓General"
}
}
],
"placeholder": "No settings in this category",
"title": "󰕈OS"
"title": "󰒔System"
}
},
{
Expand Down Expand Up @@ -317,6 +363,10 @@
"recorded_sequence": [],
"settings_items_priorities": {}
},
"settings": {
"_type": "SettingsState",
"is_debug_enabled": false
},
"status_icons": {
"_type": "StatusIconsState",
"icons": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"main": {
"_type": "MainState",
"depth": 1,
"is_footer_visible": true,
"is_header_visible": true,
"is_recording": false,
"menu": {
"_type": "HeadlessMenu",
Expand Down Expand Up @@ -121,17 +123,61 @@
1,
1
],
"icon": "󰕈",
"icon": "󰒔",
"is_short": false,
"key": "OS",
"label": "OS",
"key": "System",
"label": "System",
"opacity": null,
"progress": null,
"sub_menu": {
"_type": "HeadlessMenu",
"items": [],
"items": [
{
"_type": "SubMenuItem",
"background_color": "#68B7FF",
"color": [
1,
1,
1,
1
],
"icon": "󰒓",
"is_short": false,
"key": "general",
"label": "General",
"opacity": null,
"progress": null,
"sub_menu": {
"_type": "HeadlessMenu",
"items": [
{
"_type": "DispatchItem",
"action": "<function:<lambda>>",
"background_color": "#68B7FF",
"color": [
1,
1,
1,
1
],
"icon": "󰄱",
"is_short": false,
"key": null,
"label": "Debug",
"opacity": null,
"progress": null,
"store_action": {
"_type": "SettingsToggleDebugModeAction"
}
}
],
"placeholder": null,
"title": "󰒓General"
}
}
],
"placeholder": "No settings in this category",
"title": "󰕈OS"
"title": "󰒔System"
}
},
{
Expand Down Expand Up @@ -317,6 +363,10 @@
"recorded_sequence": [],
"settings_items_priorities": {}
},
"settings": {
"_type": "SettingsState",
"is_debug_enabled": false
},
"status_icons": {
"_type": "StatusIconsState",
"icons": []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// window-desktop-000
f01c8c31e23986fc788412f94a90c811765b446290ad9754217d02a67f08dc31
3b1d881ec84387d968591db2f48196cd9eeaeeff69e4a1630cf8ace1afb42038
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// window-rpi-000
541be70b6889a2116a6e4bb0d731b41ff14d9512af8786ceb4fb32b4adf594a4
dff1a2e925b4140a892f85e9c7db0895d8128920f7f4ff68efeec064765f6559
Loading
Loading