Skip to content

ism330dl: Rename temperature_c() to temperature() for convention.#211

Merged
nedseb merged 1 commit intomainfrom
fix/ism330dl-temperature-rename
Mar 22, 2026
Merged

ism330dl: Rename temperature_c() to temperature() for convention.#211
nedseb merged 1 commit intomainfrom
fix/ism330dl-temperature-rename

Conversation

@nedseb
Copy link
Copy Markdown
Contributor

@nedseb nedseb commented Mar 22, 2026

Closes #210

Summary

Rename temperature_c() to temperature() in the ISM330DL driver to follow the project convention: no unit suffix for SI units (°C for temperature, %RH for humidity).

Changes

File Change
lib/ism330dl/ism330dl/device.py Method renamed
lib/ism330dl/examples/basic_read.py Call updated
lib/ism330dl/README.md API doc updated (2 occurrences)
tests/scenarios/ism330dl.yaml 7 test references updated
tests/scenarios/board_temperature_comparison.yaml 3 references updated
lib/steami_config/examples/calibrate_temperature.py ISM330DL entry updated
README.md Quick start example updated

Verification

  • ruff check passes
  • 34/34 ISM330DL mock tests pass
  • No remaining temperature_c method calls (only local variable names in other drivers, which are unrelated)

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@nedseb nedseb requested a review from Copilot March 22, 2026 20:43
@nedseb nedseb added the bug Something isn't working label Mar 22, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Renames the ISM330DL driver temperature method to align with the repository-wide driver API convention (no unit suffix for SI-based temperature readings).

Changes:

  • Renamed ISM330DL.temperature_c() to ISM330DL.temperature().
  • Updated examples and documentation to call temperature().
  • Updated YAML scenario tests that referenced the old method name.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/ism330dl/ism330dl/device.py Renames the public temperature API to match conventions.
lib/ism330dl/examples/basic_read.py Updates example usage to the renamed method.
lib/ism330dl/README.md Updates driver README examples/API references to temperature().
tests/scenarios/ism330dl.yaml Updates scenario calls/scripts to use temperature().
tests/scenarios/board_temperature_comparison.yaml Updates temperature comparison scenario to use temperature().
lib/steami_config/examples/calibrate_temperature.py Updates ISM330DL method entry used by calibration example.
README.md Updates top-level quick-start snippet to use temperature().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

def temperature(self):
factory = TEMP_OFFSET + self.temperature_raw() / TEMP_SENSITIVITY
return self._temp_gain * factory + self._temp_offset

Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

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

Renaming temperature_c() to temperature() is a breaking API change for downstream users. Consider keeping a temperature_c() wrapper (deprecated) that forwards to temperature() for at least one release cycle, or document the breaking change prominently in the driver README/root README changelog section if you intentionally want a hard break.

Suggested change
def temperature_c(self):
"""Deprecated: use `temperature()` instead."""
return self.temperature()

Copilot uses AI. Check for mistakes.
@nedseb
Copy link
Copy Markdown
Contributor Author

nedseb commented Mar 22, 2026

Re: Copilot suggestion (deprecated wrapper)

No backward-compatibility alias needed — the project has no published release yet. This was decided during issue #82 (snake_case migration): deprecated wrappers are not kept since no external code depends on the old names. The rename is documented in the PR description and the driver README.

@nedseb nedseb merged commit 1effbea into main Mar 22, 2026
8 checks passed
@nedseb nedseb deleted the fix/ism330dl-temperature-rename branch March 22, 2026 20:46
@semantic-release-updater
Copy link
Copy Markdown

🎉 This PR is included in version 0.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: renommer temperature_c() en temperature() dans ISM330DL

2 participants