Remove public api_version property and describe config options#1524
Merged
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1524 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 1239 1236 -3
Branches 142 142
=========================================
- Hits 1239 1236 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies the public-facing version/capability terminology by removing the BSBLAN.api_version property and consolidating user-facing guidance around the /JV-reported json_api_version as the configuration-selection signal.
Changes:
- Removed the public
api_versionproperty and its corresponding unit test. - Updated example code to stop referencing
api_versionand display/JV’s JSON-API version instead. - Refreshed README and docs language to describe “full/basic configuration” selected from
/JVrather than “API v2/v3 support”.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_version_errors.py |
Removes the test asserting the (now-removed) public api_version property. |
src/bsblan/bsblan.py |
Removes the public api_version property and adjusts json_api_version docstring wording. |
README.md |
Updates compatibility terminology to “full/basic configuration” keyed off /JV. |
examples/control.py |
Removes api_version from the printed device info output and function signature. |
docs/index.md |
Updates feature bullets to reflect capability/config selection terminology. |
docs/getting-started.md |
Updates the compatibility section wording to match the new terminology. |
Comment on lines
+384
to
+386
| This is the firmware-independent JSON-API version (e.g. ``"2.0"``) and | ||
| the signal used to select the device configuration. Returns ``None`` | ||
| until ``/JV`` has been queried during initialization. |
Comment on lines
182
to
185
| device (Device): The device information from the BSBLan device. | ||
| info (Info): The general information from the BSBLan device. | ||
| api_version (str | None): The resolved API configuration version | ||
| (``"v2"`` or ``"v3"``). | ||
| json_api_version (str | None): The BSB-LAN JSON-API version reported by | ||
| the ``/JV`` endpoint, if available. |
| - API v3 parameter support, plus basic support for JSON-API 1.x devices | ||
| - Automatic version detection via the BSB-LAN JSON-API (`/JV`) | ||
| - Full parameter support, plus basic support for JSON-API 1.x devices | ||
| - Automatic capability detection via the BSB-LAN JSON-API (`/JV`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request focuses on clarifying terminology and simplifying the public API related to device capability detection and version reporting. It removes the
api_versionproperty and references, consolidating on the use ofjson_api_versionfor configuration selection and documentation. Documentation and example code are updated to reflect these changes.Public API simplification:
api_versionproperty from theBSBLANclass and all related references, consolidating version reporting to use onlyjson_api_versionfor clarity and to prevent confusion. [1] [2] [3] [4]Documentation and terminology updates: