Skip to content

Re-architect library - #255

Merged
bachya merged 2 commits into
devfrom
rearch
Sep 27, 2021
Merged

bachya merged 2 commits into
devfrom
rearch

Conversation

@bachya

@bachya bachya commented Sep 27, 2021 •

Copy link
Copy Markdown
Owner

Breaking Change

Some method signatures have changed slightly; be sure to read the documentation.

Describe what the PR does:

This PR achieves a fairly substantial re-architecture of the library. The majority of it is under the hood, but some key points:

  • Entities are now referred to Devices
  • Switched to aresponses for the test framework
  • Cleaned up a large number of inconsistences

Does this fix a specific issue?

N/A

Checklist:

  • Confirm that one or more new tests are written for the new functionality.
  • Run tests and ensure everything passes (with 100% test coverage).
  • Update README.md and docs/ with any new documentation.
  • Add yourself to AUTHORS.md.

@bachya bachya added maintenance Generic library tasks breaking-change A breaking change for existing users labels Sep 27, 2021
@bachya bachya self-assigned this Sep 27, 2021
Comment thread simplipy/device/lock.py
LOCKED = 1
UNLOCKED = 2

def __init__(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.

@codecov

codecov Bot commented Sep 27, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #255 (1a09098) into dev (e36b406) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               dev      #255   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           14        14           
  Lines          707       713    +6     
=========================================
+ Hits           707       713    +6     
Impacted Files Coverage Δ
simplipy/__init__.py 100.00% <100.00%> (ø)
simplipy/api.py 100.00% <100.00%> (ø)
simplipy/device/__init__.py 100.00% <100.00%> (ø)
simplipy/device/camera.py 100.00% <100.00%> (ø)
simplipy/device/lock.py 100.00% <100.00%> (ø)
simplipy/device/sensor/v2.py 100.00% <100.00%> (ø)
simplipy/device/sensor/v3.py 100.00% <100.00%> (ø)
simplipy/system/__init__.py 100.00% <100.00%> (ø)
simplipy/system/v2.py 100.00% <100.00%> (ø)
simplipy/system/v3.py 100.00% <100.00%> (ø)
... and 2 more

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 e36b406...1a09098. Read the comment docs.

@qlty-cloud-legacy

Copy link
Copy Markdown

Code Climate has analyzed commit 1a09098 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

@bachya
bachya merged commit c062b72 into dev Sep 27, 2021
@bachya
bachya deleted the rearch branch September 27, 2021 21:24
bachya added a commit to Abductist/simplisafe-python that referenced this pull request Sep 27, 2021
* Re-architect library

* Update docs
bachya added a commit that referenced this pull request Sep 27, 2021
* Update camera.py

Added in the model type of the 1080p version of the SimpliCam

* Update camera.py

Removed the CAMERA_MODEL_CAMERA_1080 constant. Added the new outdoor camera's model type.

* Update entity.py

Added the new outdoor camera's entity id number

* Update sphinx-rtd-theme requirement from ^0.5.0 to ^1.0.0 (#254)

* Update sphinx-rtd-theme requirement from ^0.5.0 to ^1.0.0

Updates the requirements on [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) to permit the latest version.
- [Release notes](https://github.com/readthedocs/sphinx_rtd_theme/releases)
- [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst)
- [Commits](readthedocs/sphinx_rtd_theme@0.5.0...1.0.0)

---
updated-dependencies:
- dependency-name: sphinx-rtd-theme
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix tests

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron Bach <[email protected]>

* Re-architect library (#255)

* Re-architect library

* Update docs

* Update camera.py

Added in the model type of the 1080p version of the SimpliCam

* Update camera.py

Removed the CAMERA_MODEL_CAMERA_1080 constant. Added the new outdoor camera's model type.

* Update camera.py

Added in the model type of the 1080p version of the SimpliCam

* Update camera.py

Removed the CAMERA_MODEL_CAMERA_1080 constant. Added the new outdoor camera's model type.

* Update AUTHORS

* Add device type

* Fix tests

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron Bach <[email protected]>
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

breaking-change A breaking change for existing users maintenance Generic library tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant