Skip to content

Commit

Permalink
build: update headless-kivy to the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
sassanh committed Jul 4, 2024
1 parent 045d0ad commit 18022d3
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 394 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration_delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
virtualenvs-create: true

- name: Install dependencies
run: poetry install --extras=dev --with dev
run: poetry install --with dev

type-check:
name: Type Check
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Version 0.11.16

- build: update `headless-kivy` to the latest version

## Version 0.11.15

- fix: set duration of `0` for when `_no_transition` is passed to `_switch_to` method
Expand Down
406 changes: 29 additions & 377 deletions poetry.lock

Large diffs are not rendered by default.

15 changes: 2 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ubo-gui"
version = "0.11.15"
version = "0.11.16"
description = "GUI sdk for Ubo Pod"
authors = ["Sassan Haradji <[email protected]>"]
license = "Apache-2.0"
Expand All @@ -9,15 +9,8 @@ packages = [{ include = "ubo_gui" }]
include = ['ubo_gui/assets/fonts/*']

[tool.poetry.dependencies]
headless-kivy = "^0.9.0"
python = "^3.11"
headless-kivy-pi = [
{ version = "^0.8.1", markers = "extra=='default'", extras = [
'default',
] },
{ version = "^0.8.1", markers = "extra=='dev'", extras = [
'dev',
] },
]
python-immutable = "^1.0.2"
qrcode = "^7.4.2"

Expand All @@ -29,10 +22,6 @@ poethepoet = "^0.24.4"
pyright = "^1.1.366"
ruff = "^0.4.8"

[tool.poetry.extras]
dev = ['headless-kivy-pi']
default = ['headless-kivy-pi']

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Expand Down
2 changes: 1 addition & 1 deletion ubo_gui/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from functools import cached_property
from typing import TYPE_CHECKING, cast

from headless_kivy_pi import HeadlessWidget
from headless_kivy import HeadlessWidget
from kivy.app import App
from kivy.core.text import DEFAULT_FONT, LabelBase
from kivy.lang.builder import Builder
Expand Down
8 changes: 7 additions & 1 deletion ubo_gui/menu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Callable, Self, Sequence, cast, overload

from headless_kivy_pi import HeadlessWidget
from headless_kivy import HeadlessWidget
from kivy.lang.builder import Builder
from kivy.properties import (
AliasProperty,
Expand Down Expand Up @@ -638,6 +638,9 @@ def _replace(
application=item,
parent=self.top.parent,
)
else:
msg = f'Unsupported type: {type(item)}'
raise TypeError(msg)
self.stack[item_index] = new_item
self.top.subscriptions = subscriptions
self._switch_to(
Expand Down Expand Up @@ -683,6 +686,9 @@ def _push( # noqa: PLR0913
new_top = StackMenuItem(menu=item, page_index=0, parent=parent)
elif isinstance(item, PageWidget):
new_top = StackApplicationItem(application=item, parent=parent)
else:
msg = f'Unsupported type: {type(item)}'
raise TypeError(msg)
self.stack = [*self.stack, new_top]

self._switch_to(
Expand Down
2 changes: 1 addition & 1 deletion ubo_gui/menu/transitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from functools import cached_property
from typing import Any, NotRequired, TypedDict

from headless_kivy_pi import HeadlessWidget
from headless_kivy import HeadlessWidget
from kivy.clock import mainthread
from kivy.uix.screenmanager import (
NoTransition,
Expand Down

0 comments on commit 18022d3

Please sign in to comment.