DurgNomis-drol / mytoyota

Python client for Toyota Connected Services API
MIT License
80 stars 33 forks source link

Enhancement: Add logging on api endpoints #296

Closed CM000n closed 10 months ago

CM000n commented 10 months ago

I found it quite helpful to have a logging option to compare endpoint responses and parsed models. The hishel and httpx packages provide information by default when logging is enabled. This PR complements therefore the logging for parsed pydantic models of api responses and introduces a central logging config.

codecov[bot] commented 10 months ago

Codecov Report

Attention: 26 lines in your changes are missing coverage. Please review.

Comparison is base (77d1de0) 71.28% compared to head (be4b4d3) 71.01%.

Files Patch % Lines
mytoyota/api.py 11.11% 24 Missing :warning:
mytoyota/statistics.py 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #296 +/- ## ========================================== - Coverage 71.28% 71.01% -0.27% ========================================== Files 28 30 +2 Lines 1386 1432 +46 ========================================== + Hits 988 1017 +29 - Misses 398 415 +17 ``` | [Flag](https://app.codecov.io/gh/DurgNomis-drol/mytoyota/pull/296/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Hansen) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/DurgNomis-drol/mytoyota/pull/296/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Hansen) | `71.01% <57.37%> (-0.27%)` | :arrow_down: | 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=Simon+Hansen#carryforward-flags-in-the-pull-request-comment) to find out more.

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