Skip to content

Commit

Permalink
feat(core): organize settings in four different categories of connect…
Browse files Browse the repository at this point in the history
…ivity, interface, system and apps

feat(core): parse pronunciation hints in notification's extra info and render them as normal text while passing them to picovoice (used for pronunciation of ssh for example)
feat (core): add shortcut `s` to write a json dump of the store into `snapshot.json`
feat(core): add dill package and use it for pickling complex datatypes
feat(core): add secrets module to abstract storing, recalling and removing secrets
feat(core): add persistent_store module to abstract storing and recalling store elements
feat(voice): use the new secrets module to save and load picovoice access key
feat(docker): use the new secrets module to save and load passwords of different registries
feat(docker): use the new persistent_store module to save and load docker registry to username mapping
feat(sound): use the new persistent_store module to save and load playback volume, capture volume, and their mute state
  • Loading branch information
sassanh committed Apr 24, 2024
1 parent 7bbfd55 commit 20e6114
Show file tree
Hide file tree
Showing 53 changed files with 2,497 additions and 518 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,6 @@ headless_kivy_pi_buffer.raw
*/packer/packer_cache/
*/packer/output-*

screenshots
/screenshots
/snapshot.json
/snapshot.bin
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## Version 0.13.0

- feat(core): organize settings in four different categories of connectivity,
interface, system and apps
- feat(core): parse pronunciation hints in notification's extra info and render them
as normal text while passing them to picovoice (used for pronunciation of ssh
for example)
- feat (core): add shortcut `s` to write a json dump of the store into `snapshot.json`
- feat(core): add dill package and use it for pickling complex datatypes
- feat(core): add secrets module to abstract storing, recalling and removing secrets
- feat(core): add persistent_store module to abstract storing and recalling store
elements
- feat(voice): use the new secrets module to save and load picovoice access key
- feat(docker): use the new secrets module to save and load passwords of different
registries
- feat(docker): use the new persistent_store module to save and load docker registry
to username mapping
- feat(sound): use the new persistent_store module to save and load playback volume,
capture volume, and their mute state

## Version 0.12.7

- feat(notification): make the extra information screen scrollable
Expand Down
420 changes: 344 additions & 76 deletions poetry.lock

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ubo-app"
version = "0.12.7"
version = "0.13.0"
description = "Ubo main app, running on device initialization. A platform for running other apps."
authors = ["Sassan Haradji <[email protected]>"]
license = "Apache-2.0"
Expand All @@ -25,7 +25,7 @@ ubo-gui = [
"dev",
] },
]
python-redux = "^0.14.1"
python-redux = "^0.14.3"
pyzbar = "^0.1.9"
sdbus-networkmanager = { version = "^2.0.0", markers = "platform_machine=='aarch64'" }
rpi_ws281x = { version = "^5.0.0", markers = "platform_machine=='aarch64'" }
Expand All @@ -40,13 +40,15 @@ docker = "^7.0.0"
python-dotenv = "^1.0.1"
sentry-sdk = "^1.43.0"
pvorca = "^0.1.4"
platformdirs = "^4.2.0"
dill = "^0.3.8"

[tool.poetry.group.dev]
optional = true

[tool.poetry.group.dev.dependencies]
poethepoet = "^0.24.4"
pyright = "^1.1.359"
pyright = "^1.1.360"
pytest = "^8.0.0"
pytest-asyncio = "^0.23.5.post1"
pytest-cov = "^4.1.0"
Expand All @@ -57,6 +59,7 @@ tenacity = "^8.2.3"
toml = "^0.10.2"
pytest-mock = "^3.14.0"
pyaudio = { version = "^0.2.14", markers = "platform_machine!='aarch64'" }
ipython = "^8.23.0"

[tool.poetry.extras]
default = ["ubo-gui"]
Expand Down Expand Up @@ -105,8 +108,8 @@ inline-quotes = "single"
multiline-quotes = "double"

[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "PLR0913"]
"**/reducer.py" = ["C901", "PLR0912"]
"tests/*" = ["S101", "PLR0913", "PLR0915"]
"**/reducer.py" = ["C901", "PLR0912", "PLR0915"]
"ubo_app/services/*/ubo_handle.py" = ["TCH004"]

[tool.ruff.format]
Expand Down
2 changes: 1 addition & 1 deletion scripts/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:mantic

ARG DEBIAN_FRONTEND=noninteractive
RUN apt -y update
RUN apt -y install gcc curl git libcap-dev libegl1 libgl1 libmtdev1 libzbar0 python3 python3-dev
RUN apt -y install gcc curl git libcap-dev libegl1 libgl1 libmtdev1 libzbar0 python3 python3-dev file
RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH="${PATH}:/root/.local/bin"
WORKDIR /ubo-app
Expand Down
4 changes: 1 addition & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

pytest.register_assert_rewrite('tests.fixtures')

# isort: off
from tests.fixtures import ( # noqa: E402
from tests.fixtures import ( # noqa: E402, I001
AppContext,
LoadServices,
Stability,
Expand All @@ -36,7 +35,6 @@
store_snapshot,
wait_for,
)
# isort: on


fixtures = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,44 +55,113 @@
1,
1
],
"icon": "󰖩",
"icon": null,
"is_short": false,
"label": "WiFi",
"label": "Connectivity",
"sub_menu": {
"items": [
{
"application": "ubo_app/services/030-wifi/pages/create_wireless_connection.py:CreateWirelessConnectionPage",
"background_color": "#68B7FF",
"color": [
1,
1,
1,
1
],
"icon": "󱛃",
"icon": "󰖩",
"is_short": false,
"label": "Add"
},
{
"action": "",
"background_color": "#68B7FF",
"color": [
1,
1,
1,
1
],
"icon": "󱖫",
"is_short": false,
"label": "Select"
"label": "WiFi",
"sub_menu": {
"items": [
{
"application": "ubo_app/services/030-wifi/pages/create_wireless_connection.py:CreateWirelessConnectionPage",
"background_color": "#68B7FF",
"color": [
1,
1,
1,
1
],
"icon": "󱛃",
"is_short": false,
"label": "Add"
},
{
"action": "",
"background_color": "#68B7FF",
"color": [
1,
1,
1,
1
],
"icon": "󱖫",
"is_short": false,
"label": "Select"
}
],
"placeholder": null,
"title": "WiFi Settings"
}
}
],
"placeholder": null,
"title": "WiFi Settings"
"placeholder": "No settings in this category",
"title": "Connectivity"
}
},
{
"background_color": "#68B7FF",
"color": [
1,
1,
1,
1
],
"icon": null,
"is_short": false,
"label": "Interface",
"sub_menu": {
"items": [],
"placeholder": "No settings in this category",
"title": "Interface"
}
},
{
"background_color": "#68B7FF",
"color": [
1,
1,
1,
1
],
"icon": null,
"is_short": false,
"label": "System",
"sub_menu": {
"items": [],
"placeholder": "No settings in this category",
"title": "System"
}
},
{
"background_color": "#68B7FF",
"color": [
1,
1,
1,
1
],
"icon": null,
"is_short": false,
"label": "Apps",
"sub_menu": {
"items": [],
"placeholder": "No settings in this category",
"title": "Apps"
}
}
],
"placeholder": "No settings",
"placeholder": null,
"title": "Settings"
}
},
Expand Down Expand Up @@ -159,7 +228,10 @@
},
"path": [
"Dashboard"
]
],
"settings_items_priorities": {
"WiFi": 2
}
},
"status_icons": {
"icons": [
Expand Down
Loading

0 comments on commit 20e6114

Please sign in to comment.