Skip to content

Remove public api_version property and describe config options#1524

Merged
liudger merged 1 commit into
mainfrom
refactor/drop-api-version-stage-1
Jun 8, 2026
Merged

Remove public api_version property and describe config options#1524
liudger merged 1 commit into
mainfrom
refactor/drop-api-version-stage-1

Conversation

@liudger

@liudger liudger commented Jun 8, 2026

Copy link
Copy Markdown
Owner

This pull request focuses on clarifying terminology and simplifying the public API related to device capability detection and version reporting. It removes the api_version property and references, consolidating on the use of json_api_version for configuration selection and documentation. Documentation and example code are updated to reflect these changes.

Public API simplification:

  • Removed the api_version property from the BSBLAN class and all related references, consolidating version reporting to use only json_api_version for clarity and to prevent confusion. [1] [2] [3] [4]

Documentation and terminology updates:

  • Updated documentation and user-facing descriptions to clarify that configuration selection is based on device "capabilities" and "configuration" rather than "support" or "API version," improving accuracy and user understanding. [1] [2] [3]
  • Adjusted comments and docstrings to reflect the new terminology and configuration selection logic, ensuring consistency throughout the codebase.

Copilot AI review requested due to automatic review settings June 8, 2026 13:11
@liudger liudger added the refactor Improvement of existing code, not introducing new features. label Jun 8, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jun 8, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (db255ee) to head (6c3f115).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_version property and its corresponding unit test.
  • Updated example code to stop referencing api_version and display /JV’s JSON-API version instead.
  • Refreshed README and docs language to describe “full/basic configuration” selected from /JV rather 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 thread src/bsblan/bsblan.py
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 thread examples/control.py
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.
Comment thread docs/index.md
- 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`)
@liudger liudger merged commit 7263e2b into main Jun 8, 2026
18 checks passed
@liudger liudger deleted the refactor/drop-api-version-stage-1 branch June 8, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Improvement of existing code, not introducing new features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants