bimmerconnected / bimmer_connected

🚘 Library to query the status of your BMW or Mini from the ConnectedDrive portal
Apache License 2.0
365 stars 79 forks source link

Add headunit data class also exposing current vehicle software version #568

Closed cubinet-code closed 1 year ago

cubinet-code commented 1 year ago

Proposed change

This enhancement adds headunit information like ID Drive generation and its current software revision. Only vehicle data that also exists on older vehicles was used.

Headunit(idrive_version='ID8', headunit_type='MGU', software_version='07/2023.35')

Type of change

Checklist

rikroe commented 1 year ago

Need to double check, there seems to be something wrong with all pytests (maybe a test dependency upgrade, not your code l.

cubinet-code commented 1 year ago

Thanks for having a look.

It seem to be related to this: https://github.com/adamchainz/time-machine/issues/387 in test_get_remote_position_too_old.

diff --git a/requirements-test.txt b/requirements-test.txt
-time_machine
+time_machine==2.12.0

After going back to 2.12.0 version tests pass again:


============================================================================ test session starts ============================================================================
platform darwin -- Python 3.11.3, pytest-7.4.2, pluggy-1.3.0
rootdir: /Users/oliverf/Documents/Project/bimmer_connected
configfile: pyproject.toml
plugins: anyio-4.0.0, respx-0.20.2, timeout-2.1.0, cov-4.1.0, asyncio-0.21.1, time-machine-2.12.0
asyncio: mode=Mode.STRICT
collected 85 items                                                                                                                                                          

bimmer_connected/tests/test_account.py ..........................                                                                                                     [ 30%]
bimmer_connected/tests/test_api.py .....                                                                                                                              [ 36%]
bimmer_connected/tests/test_remote_services.py ................                                                                                                       [ 55%]
bimmer_connected/tests/test_utils.py .....                                                                                                                            [ 61%]
bimmer_connected/tests/test_vehicle.py ............                                                                                                                   [ 75%]
bimmer_connected/tests/test_vehicle_status.py .....................                                                                                                   [100%]

============================================================================ 85 passed in 8.20s =============================================================================
rikroe commented 1 year ago

Thanks for the hint! In that case, I would be fine with pinning time_machine<2.13.0 for now.

cubinet-code commented 1 year ago

I submitted a PR, so you don't have to :)

rikroe commented 1 year ago

I submitted a PR, so you don't have to :)

Thanks, please rebase and this should be good to go.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (1376e3a) 100.00% compared to head (022ba45) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #568 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 17 17 Lines 1334 1355 +21 ========================================= + Hits 1334 1355 +21 ``` | [Flag](https://app.codecov.io/gh/bimmerconnected/bimmer_connected/pull/568/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected) | Coverage Δ | | |---|---|---| | [3.10](https://app.codecov.io/gh/bimmerconnected/bimmer_connected/pull/568/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected) | `100.00% <100.00%> (ø)` | | | [3.11](https://app.codecov.io/gh/bimmerconnected/bimmer_connected/pull/568/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected) | `100.00% <100.00%> (ø)` | | | [3.12](https://app.codecov.io/gh/bimmerconnected/bimmer_connected/pull/568/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected) | `100.00% <100.00%> (ø)` | | | [3.8](https://app.codecov.io/gh/bimmerconnected/bimmer_connected/pull/568/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected) | `100.00% <100.00%> (ø)` | | | [3.9](https://app.codecov.io/gh/bimmerconnected/bimmer_connected/pull/568/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected) | `100.00% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/bimmerconnected/bimmer_connected/pull/568?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected) | Coverage Δ | | |---|---|---| | [bimmer\_connected/vehicle/reports.py](https://app.codecov.io/gh/bimmerconnected/bimmer_connected/pull/568?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected#diff-YmltbWVyX2Nvbm5lY3RlZC92ZWhpY2xlL3JlcG9ydHMucHk=) | `100.00% <100.00%> (ø)` | | | [bimmer\_connected/vehicle/vehicle.py](https://app.codecov.io/gh/bimmerconnected/bimmer_connected/pull/568?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bimmerconnected#diff-YmltbWVyX2Nvbm5lY3RlZC92ZWhpY2xlL3ZlaGljbGUucHk=) | `100.00% <100.00%> (ø)` | |

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