Closed palazzem closed 4 years ago
Merging #48 into master will not change coverage by
%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #48 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 9 -1
Lines 229 236 +7
=========================================
+ Hits 229 236 +7
Impacted Files | Coverage Δ | |
---|---|---|
elmo/api/client.py | 100.00% <100.00%> (ø) |
|
elmo/api/exceptions.py | 100.00% <100.00%> (ø) |
|
elmo/api/router.py | 100.00% <100.00%> (ø) |
|
elmo/query.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 4def837...a93ede7. Read the comment docs.
Overview
This PR is a major refactoring that removes
beautifulsoup4
in favor of (undocumented) Elmo's API. This is considered a breaking change because it alters the output ofclient.check()
. Main changes are:/api/strings
endpoint is used instead of scraping a page. That removesparser.py
andresponse_helper.py
modulesbeautifulsoup4
dependencyareas
intosectors
.check()
returns a dictionary with different keysAfter
{ "sectors_armed": [{"id": 0, "name": "Entryway", "element": 1, "index": 0}, ...], "sectors_disarmed": [{"id": 1, "name": "Kitchen", "element": 2, "index": 1}, ...], "inputs_alerted": [{"id": 0, "name": "Door", "element": 3, "index": 0}, ...], "inputs_wait": [{"id": 1, "name": "Window", "element": 4, "index": 1}, ...], }