zigpy / bellows

A Python 3 project to implement EZSP for EmberZNet devices
GNU General Public License v3.0
177 stars 86 forks source link

Fix blocking metadata version call #630

Closed TheJulianJES closed 3 weeks ago

TheJulianJES commented 3 weeks ago

This moves the blocking metadata version call outside of the load_network_info coroutine that's run at startup. I'll do this for the other radio libraries too, just want to confirm if we want to have that constant named LIB_VERSION, just VERSION, PACKAGE_VERSION, or BELLOWS_VERSION?

The test still blocks when checking it, but that should be fine.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.72%. Comparing base (09cf7ce) to head (6e051af).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #630 +/- ## ======================================= Coverage 99.72% 99.72% ======================================= Files 75 75 Lines 5002 5003 +1 ======================================= + Hits 4988 4989 +1 Misses 14 14 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

puddly commented 3 weeks ago

I think I've only ever seen top_level_module.__version__. Putting it in module.application.zigbee.LIB_VERSION makes it pretty much library-internal.

TheJulianJES commented 3 weeks ago

I think I've only ever seen top_level_module.__version__. Putting it in module.application.zigbee.LIB_VERSION makes it pretty much library-internal.

Yeah, I don't expect anyone else to use this. This is just to fix the blocking call. I just used LIB_VERSION as the name, so it's clear that we don't access the EZSP version or whatever. Or do you want something else?

puddly commented 3 weeks ago

Nope, it's all good the way it is. Thanks!