Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solis wifistick alternative approach #95

Merged
merged 7 commits into from Feb 13, 2022
Merged

Solis wifistick alternative approach #95

merged 7 commits into from Feb 13, 2022

Conversation

mvdwetering
Copy link
Contributor

@mvdwetering mvdwetering commented Dec 29, 2021

This is an alternative approach to the changes in PR #55.

Instead of not allowing a session to be provided it will now use the provided session or create a session for one time use.

Note that I don't really like the big try/finally block, but it seemed better than putting callse to close() all over the place which is errorprone.

@klaasnicolaas klaasnicolaas added the enhancement Enhancement of the code, not introducing new features. label Dec 29, 2021
@codecov
Copy link

codecov bot commented Dec 29, 2021

Codecov Report

Merging #95 (e2eeaca) into main (95f76da) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #95   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          181       188    +7     
  Branches        35        38    +3     
=========================================
+ Hits           181       188    +7     
Impacted Files Coverage Δ
omnikinverter/models.py 100.00% <100.00%> (ø)
omnikinverter/omnikinverter.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95f76da...e2eeaca. Read the comment docs.

@klaasnicolaas klaasnicolaas changed the base branch from master to main December 30, 2021 16:21
@mvdwetering
Copy link
Contributor Author

It was a bit tricky because the codepath is only triggered when there is a session active, so during a request, but I have it covered now.

I think this makes it a bit clearer what the test stands for.
Copy link
Owner

@klaasnicolaas klaasnicolaas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test with another inverter and made a few more minor changes, ready for merging!

@klaasnicolaas klaasnicolaas merged commit 4b69520 into klaasnicolaas:main Feb 13, 2022
@mvdwetering mvdwetering deleted the solis_wifistick_alternative branch February 16, 2022 19:32
@github-actions github-actions bot locked and limited conversation to collaborators May 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Enhancement of the code, not introducing new features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants