Bug 1885503 - Review Request: python-habapp - Automation with MQTT and/or openHAB
Summary: Review Request: python-habapp - Automation with MQTT and/or openHAB
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Andy Mender
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1878069 1878079 1885501
Blocks: FE-DEADREVIEW IoT
TreeView+ depends on / blocked
 
Reported: 2020-10-06 08:00 UTC by Fabian Affolter
Modified: 2021-03-29 00:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-29 00:45:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Fabian Affolter 2020-10-06 08:00:19 UTC
Spec URL: https://fab.fedorapeople.org/packages/SRPMS/python-habapp.spec
SRPM URL: https://fab.fedorapeople.org/packages/SRPMS/python-habapp-0.15.2-1.fc32.src.rpm

Project URL: https://github.com/spacemanspiff2007/HABApp

Description:
HABApp is a asyncio/multithread application that connects to an openHAB
instance and/or a MQTT broker. It is possible to create rules that listen
to events from these instances and then react accordingly.

Koji scratch build:
fails due to missing dependencies

rpmlint output:
$ rpmlint python-habapp-0.15.2-1.fc32.src.rpm 
python-habapp.src: W: spelling-error Summary(en_US) openHAB -> openhanded
python-habapp.src: W: spelling-error %description -l en_US asyncio -> syncopation
python-habapp.src: W: spelling-error %description -l en_US multithread -> multitude
python-habapp.src: W: spelling-error %description -l en_US openHAB -> openhanded
1 packages and 0 specfiles checked; 0 errors, 4 warnings.

$ rpmlint python3-habapp-0.15.2-1.fc32.noarch.rpm 
python3-habapp.noarch: W: spelling-error Summary(en_US) openHAB -> openhanded
python3-habapp.noarch: W: spelling-error %description -l en_US asyncio -> syncopation
python3-habapp.noarch: W: spelling-error %description -l en_US multithread -> multitude
python3-habapp.noarch: W: spelling-error %description -l en_US openHAB -> openhanded
python3-habapp.noarch: W: no-manual-page-for-binary habapp
1 packages and 0 specfiles checked; 0 errors, 5 warnings.

Fedora Account System Username: fab

Comment 1 Fabian Affolter 2020-12-02 09:47:21 UTC
%changelog
* Tue Dec 01 2020 Fabian Affolter <mail> - 0.16.2-1
- Update to latest upstream release 0.16.2

Spec URL: https://fab.fedorapeople.org/packages/SRPMS/python-habapp.spec
SRPM URL: https://fab.fedorapeople.org/packages/SRPMS/python-habapp-0.16.2-1.fc33.src.rpm

Comment 2 Andy Mender 2020-12-02 19:22:06 UTC
I just noticed I assigned myself, but didn't complete the review earlier. I'm terribly sorry :/.

Version 0.17.0 is actually out already, impressive: https://github.com/spacemanspiff2007/HABApp/releases/tag/0.17.0

Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=56626137

> BuildRequires:  python3dist(aiohttp-sse-client)
> %{?python_provide:%python_provide python3-%{pypi_name}}

Please, switch to the %py_provides macro

> # Multiples are failing with 0.16.2
> #%%check
> # Two test are failing
> #%%pytest -v tests -k "not test_run_func and not test_run_func_no_cap"

I'm unsure about this.

I re-enabled the tests and it seems a couple of things are missing:
BuildRequires:  python3dist(tzlocal)
BuildRequires:  python3dist(paho-mqtt)

But there seems to be a bug in python3-pedantic as well:
+ /usr/bin/pytest -v tests -k 'not test_run_func and not test_run_func_no_cap'
ImportError while loading conftest '/builddir/build/BUILD/HABApp-0.16.2/tests/conftest.py'.
tests/__init__.py:1: in <module>
    from .rule_runner import SimpleRuleRunner
tests/rule_runner/__init__.py:1: in <module>
    from .rule_runner import SimpleRuleRunner
tests/rule_runner/rule_runner.py:6: in <module>
    from HABApp.core import WrappedFunction
HABApp/__init__.py:14: in <module>
    import HABApp.mqtt
HABApp/mqtt/__init__.py:2: in <module>
    from . import items
HABApp/mqtt/items/__init__.py:1: in <module>
    from .mqtt_item import MqttItem
HABApp/mqtt/items/mqtt_item.py:1: in <module>
    import HABApp.mqtt.mqtt_interface
HABApp/mqtt/mqtt_interface.py:5: in <module>
    from .mqtt_connection import MqttConnection, log
HABApp/mqtt/mqtt_connection.py:9: in <module>
    from HABApp.runtime.shutdown_helper import ShutdownHelper
HABApp/runtime/__init__.py:3: in <module>
    from .runtime import Runtime
HABApp/runtime/runtime.py:7: in <module>
    import HABApp.util
HABApp/util/__init__.py:5: in <module>
    from . import multimode
HABApp/util/multimode/__init__.py:1: in <module>
    from .mode_base import BaseMode
HABApp/util/multimode/mode_base.py:32: in <module>
    from .item import MultiModeItem  # noqa: E402
HABApp/util/multimode/item.py:9: in <module>
    from HABApp.rule import get_parent_rule
HABApp/rule/__init__.py:2: in <module>
    from .rule import Rule, get_parent_rule
HABApp/rule/rule.py:13: in <module>
    import HABApp.openhab
HABApp/openhab/__init__.py:3: in <module>
    import HABApp.openhab.events
HABApp/openhab/events/__init__.py:2: in <module>
    from .item_events import ItemStateEvent, ItemStateChangedEvent, ItemCommandEvent, ItemAddedEvent,\
HABApp/openhab/events/item_events.py:4: in <module>
    from ..map_values import map_openhab_values
HABApp/openhab/map_values.py:3: in <module>
    from HABApp.openhab.definitions import HSBValue, OnOffValue, OpenClosedValue, PercentValue, QuantityValue, RawValue, \
HABApp/openhab/definitions/__init__.py:3: in <module>
    from . import rest
HABApp/openhab/definitions/rest/__init__.py:1: in <module>
    from .items import OpenhabItemDefinition
HABApp/openhab/definitions/rest/items.py:55: in <module>
    OpenhabItemDefinition.update_forward_refs()
/usr/lib/python3.9/site-packages/pydantic/main.py:677: in update_forward_refs
    update_field_forward_refs(f, globalns=globalns, localns=localns)
/usr/lib/python3.9/site-packages/pydantic/typing.py:233: in update_field_forward_refs
    field.type_ = evaluate_forwardref(field.type_, globalns, localns or None)
/usr/lib/python3.9/site-packages/pydantic/typing.py:50: in evaluate_forwardref
    return type_._evaluate(globalns, localns)
E   TypeError: _evaluate() missing 1 required positional argument: 'recursive_guard'
error: Bad exit status from /var/tmp/rpm-tmp.4OhOov (%check)
    Bad exit status from /var/tmp/rpm-tmp.4OhOov (%check)

This was addressed here: https://github.com/samuelcolvin/pydantic/issues/1985
And is already presumably in the latest 1.7.3 release, but our python3-pydantic is at 1.6.1 and no new version in Rawhide: https://src.fedoraproject.org/rpms/python-pydantic

I added Susi who's the maintainer of python-pydantic to this ticket.

Other than that, python-habapp looks good.

Comment 3 Andy Mender 2021-02-14 09:02:22 UTC
Hello Fabian and Susi, any updates on this? :)

Comment 4 Susi Lehtola 2021-02-24 13:33:38 UTC
python-pydantic updated in rawhide.

Comment 5 Andy Mender 2021-03-07 09:08:14 UTC
Awesome, thank you Susi! :)

Comment 6 Package Review 2021-03-29 00:45:18 UTC
This is an automatic action taken by review-stats script.

The ticket submitter failed to clear the NEEDINFO flag in a month.
As per https://fedoraproject.org/wiki/Policy_for_stalled_package_reviews
we consider this ticket as DEADREVIEW and proceed to close it.


Note You need to log in before you can comment on or make changes to this bug.