Skip to content

Add known smart requests to dump_devinfo - #597

Merged
rytilahti merged 3 commits into
python-kasa:masterfrom
sdb9696:add_dumpdevinfo_methods
Jan 2, 2024
Merged

Add known smart requests to dump_devinfo#597
rytilahti merged 3 commits into
python-kasa:masterfrom
sdb9696:add_dumpdevinfo_methods

Conversation

@sdb9696

@sdb9696 sdb9696 commented Dec 30, 2023

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Dec 30, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1b79142) 84.94% compared to head (6349613) 84.94%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #597   +/-   ##
=======================================
  Coverage   84.94%   84.94%           
=======================================
  Files          38       38           
  Lines        3387     3387           
  Branches      851      851           
=======================================
  Hits         2877     2877           
  Misses        424      424           
  Partials       86       86           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sdb9696 sdb9696 mentioned this pull request Dec 30, 2023
@sdb9696
sdb9696 force-pushed the add_dumpdevinfo_methods branch from 4006c92 to 708c72b Compare December 30, 2023 11:51
@rytilahti rytilahti added this to the 0.6.0 milestone Dec 31, 2023

@rytilahti rytilahti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How about we move smartrequests (or its contents?) into the devtools until we figure out what's the best approach to do this? This way we wouldn't commit into keeping this around and/or breaking it too soon, while still allowing us to get more complete fixtures after a new release is done.

@sdb9696

sdb9696 commented Dec 31, 2023

Copy link
Copy Markdown
Contributor Author

How about we move smartrequests (or its contents?) into the devtools until we figure out what's the best approach to do this? This way we wouldn't commit into keeping this around and/or breaking it too soon, while still allowing us to get more complete fixtures after a new release is done.

Ok that's done

Comment thread devtools/dump_devinfo.py Outdated
try:
responses = await device.protocol.query(final_query)
end = len(requests)
step = 10 # Break the requests down as there seems to be a size limit

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We introduced some API in #502 to help with such issues, maybe we should implement this for tapo* classes, too? I doubt this is necessary for the 0.6.0 release, but something to keep in mind to look at some point.

Comment thread devtools/smartrequests.py
Comment thread devtools/dump_devinfo.py Outdated
@sdb9696
sdb9696 requested a review from rytilahti January 2, 2024 12:57

@rytilahti rytilahti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just a couple of minor nits, I didn't check out the smartrequests itself as this is hopefully rather temporary solution until we figure out how we want to handle components/modules inside the library itself.

Comment thread devtools/dump_devinfo.py
Comment thread devtools/dump_devinfo.py
This was referenced Jan 2, 2024
@rytilahti
rytilahti merged commit ae5ad3e into python-kasa:master Jan 2, 2024
@sdb9696
sdb9696 deleted the add_dumpdevinfo_methods branch January 3, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants