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

docker compose #195

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
7 changes: 3 additions & 4 deletions .github/workflows/integration_delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,8 @@ jobs:

- name: Extract Version from CHANGELOG.md
run: |
FIRST_HEADER=$(sed -n '/## /s/## //p' CHANGELOG.md | head -n 1)
FIRST_HEADER=$(sed -n '/## /s/## //p' CHANGELOG.md | head -n 1)
if [ "$FIRST_HEADER" == "Upcoming" ]; then
# Check the version coming from extract-version starts with of x.y.z.devn
if [[ "${{ steps.extract-version.outputs.VERSION }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.dev[0-9]+ ]]; then
VERSION_CHANGELOG="This is a development version."
else
Expand All @@ -237,9 +236,9 @@ jobs:
fi
else
VERSION_CHANGELOG=$(echo $FIRST_HEADER | sed 's/Version //')
if [ "${{ steps.extract-version.outputs.VERSION }}" =~ "^$VERSION_CHANGELOG\.dev[0-9]+" ]; then
if [[ "${{ steps.extract-version.outputs.VERSION }}" =~ ^$VERSION_CHANGELOG\.dev[0-9]+ ]]; then
echo "Error: Version extracted from CHANGELOG.md does not match the version in pyproject.toml"
exit 1
exit 1
else
echo "Versions are consistent."
fi
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## Upcoming

- chore: add `log_async_process` to log the output of an async processes in a notification if they don't run successfully
- refactor(core): housekeeping: rename `extra_information` to `qr_code_generation_instructions` in `ubo_input`, add `.tmpl` extension for extension files, use `textarea` for `LONG` input field type in web dashboard, rename `..._HOST` env variables to `..._ADDRESS`, use underscore thousand separators for big numbers in codebase
- feat(docker): support docker compositions and add a way to import `docker-compose.yml` files
- feat(docker): add instructions and icon for docker compositions
- refactor(core): rerender screen when rendering on the display is resumed like when returning from viewfinder to avoid artifacts
- refactor(docker): make composition menus responsive: showing spinner, etc

## Version 1.1.0

- chore: migrate from poetry to uv for the sake of improving performance and dealing with conflicting sub-dependencies
Expand Down
12 changes: 6 additions & 6 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.7",
"headless-kivy >=0.12.1",
"ubo-gui >=0.13.10",
"headless-kivy >=0.12.2",
"pyzbar >=0.1.9",
"sdbus-networkmanager >=2.0.0 ; platform_machine=='aarch64'",
"rpi_ws281x >=5.0.0 ; platform_machine=='aarch64'",
Expand All @@ -23,7 +23,7 @@ dependencies = [
"platformdirs >=4.2.0",
"dill >=0.3.8",
"simpleaudio >=1.0.4",
"python-redux >=0.18.2",
"python-redux >=0.18.3",
"python-debouncer >=0.1.5",
"python-strtobool >=1.0.0",
"python-fake >=0.1.3",
Expand Down Expand Up @@ -67,7 +67,7 @@ packages = ["ubo_app"]
dev-dependencies = [
"headless-kivy [test] >=0.12.1",
"poethepoet >=0.24.4",
"pyright >=1.1.377",
"pyright >=1.1.389",
"pytest >=8.0.0",
"pytest-asyncio >=0.23.5.post1",
"pytest-cov >=4.1.0",
Expand Down Expand Up @@ -166,7 +166,7 @@ multiline-quotes = "double"
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "PLR0913", "PLR0915"]
"**/reducer.py" = ["C901", "PLR0912", "PLR0915"]
"ubo_app/services/*/ubo_handle.py" = ["TCH004"]
"ubo_app/services/*/ubo_handle.py" = ["TC004"]
"ubo_app/rpc/generated/*" = [
"ARG002",
"ASYNC109",
Expand All @@ -177,7 +177,7 @@ multiline-quotes = "double"
"F401",
"RUF009",
"SLF001",
"TCH001",
"TC001",
"TID252",
]

Expand Down
4 changes: 3 additions & 1 deletion setup_scm_schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@
def local_scheme(version) -> str: # noqa: ANN001
version.node = re.sub(r'.', lambda match: str(ord(match.group(0))), version.node)
original_local_version = get_local_node_and_date(version)
numeric_version = original_local_version.replace('+', '').replace('.d', '')
if not original_local_version:
return original_local_version
numeric_version = original_local_version.replace('+', '').replace('.d', '')[:12]
return datetime.now(UTC).strftime('%y%m%d') + numeric_version
12 changes: 6 additions & 6 deletions tests/fixtures/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,12 @@ def patched_config_set(category: str, key: str, value: str) -> None:
from ubo_app.display import render_on_display

headless_kivy.config.setup_headless_kivy(
{
'callback': render_on_display,
'flip_vertical': True,
'width': WIDTH,
'height': HEIGHT,
},
headless_kivy.config.SetupHeadlessConfig(
callback=render_on_display,
flip_vertical=True,
width=WIDTH,
height=HEIGHT,
),
)


Expand Down
4 changes: 3 additions & 1 deletion tests/fixtures/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import pytest
from tenacity import wait_fixed
from ubo_gui.page import PageWidget

if TYPE_CHECKING:
from redux_pytest.fixtures import WaitFor
Expand Down Expand Up @@ -87,6 +86,9 @@ def check() -> None:
assert not app_context.app.menu_widget._is_transition_in_progress # noqa: SLF001
current_page = app_context.app.menu_widget.current_screen
assert current_page is not None

from ubo_gui.page import PageWidget

assert isinstance(current_page, PageWidget)
assert all(item is None for item in current_page.items)
if placeholder is not None:
Expand Down
2 changes: 1 addition & 1 deletion tests/flows/test_wireless.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def store_snapshot_selector(state: RootState) -> WiFiState:

app = MenuApp()
app_context.set_app(app)
load_services(['camera', 'display', 'notifications', 'wifi'])
await load_services(['camera', 'display', 'notifications', 'wifi'], run_async=True)

@wait_for(wait=wait_fixed(1), run_async=True)
def check_icon(expected_icon: str) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"input": null,
"main": {
"_type": "MainState",
"apps_items_priorities": {},
"depth": 1,
"is_footer_visible": true,
"is_header_visible": true,
Expand Down Expand Up @@ -42,7 +43,7 @@
],
"icon": "󰀻",
"is_short": false,
"key": "home",
"key": "apps",
"label": "Apps",
"opacity": null,
"progress": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"input": null,
"main": {
"_type": "MainState",
"apps_items_priorities": {},
"depth": 1,
"is_footer_visible": true,
"is_header_visible": true,
Expand Down Expand Up @@ -42,7 +43,7 @@
],
"icon": "󰀻",
"is_short": false,
"key": "home",
"key": "apps",
"label": "Apps",
"opacity": null,
"progress": null,
Expand Down
Loading
Loading