8000 Add trends for weather stations and modules by cgtobi · Pull Request #118 · jabesq/netatmo-api-python · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Dec 4, 2020. It is now read-only.

Add trends for weather stations and modules #118

Merged
merged 1 commit into from
Oct 7, 2020

Conversation

cgtobi
Copy link
Collaborator
@cgtobi cgtobi commented Oct 6, 2020

No description provided.

@sourcery-ai
Copy link
sourcery-ai bot commented Oct 6, 2020

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.20%.

Quality metrics Before After Change
Complexity 2.68 ⭐ 2.75 ⭐ 0.07 👎
Method Length 67.36 🙂 68.54 🙂 1.18 👎
Working memory 10.43 😞 10.50 😞 0.07 👎
Quality 74.35% 🙂 74.15% 🙂 -0.20% 👎
Other metrics Before After Change
Lines 709 719 10
Changed files Quality Before Quality After Quality Change
src/pyatmo/weather_station.py 73.39% 🙂 72.97% 🙂 -0.42% 👎
tests/test_pyatmo_weatherstation.py 75.08% ⭐ 75.03% ⭐ -0.05% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
src/pyatmo/weather_station.py WeatherStationData.__init__.get_module_names.get_modules.get_monitored_conditions.get_last_data 19 😞 217 ⛔ 12 😞 36.39% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
src/pyatmo/weather_station.py WeatherStationData.__init__.get_module_names.get_modules.get_monitored_conditions 13 🙂 155 😞 11 😞 48.12% 😞 Try splitting into smaller methods. Extract out complex expressions
src/pyatmo/weather_station.py WeatherStationData.__init__ 18 🙂 8000 157 😞 7 🙂 52.38% 🙂 Try splitting into smaller methods
tests/test_pyatmo_weatherstation.py test_weather_station_get_monitored_conditions 0 95 🙂 34 ⛔ 53.76% 🙂 Extract out complex expressions
tests/test_pyatmo_weatherstation.py test_weather_station_get_modules 0 97 🙂 29 ⛔ 54.04% 🙂 Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

@jabesq jabesq merged commit bd9e9ea into jabesq:development Oct 7, 2020
jabesq added a commit that referenced this pull request Oct 7, 2020
v4.1.0

  * Fix token update issue with non-OAuth2 login #115
  * Add trends #118
  * Fix crash when station_name not present #117
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0