Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove constructors that take client types from public HassModel API #1177

Merged

Conversation

FrankBakkerNl
Copy link
Contributor

Proposed change

The recently added HassModel types EntityOptions and ConversationOptions had public constructors that take the correpondieng types from the HassClient project. We deliberatly avoided making the public API of Hassmodel depend on HassClient so these API's will be as independent of each other as possible. Therefore these constructors are now removed and replaced by internal mapping methods.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • The code compiles without warnings (code quality check)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration are added/changed:

Copy link

codecov bot commented Sep 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86%. Comparing base (4a090e9) to head (c49a149).
Report is 1 commits behind head on main.

Additional details and impacted files
@@         Coverage Diff          @@
##           main   #1177   +/-   ##
====================================
- Coverage    87%     86%   -1%     
====================================
  Files       193     193           
  Lines      3797    3790    -7     
  Branches    425     425           
====================================
- Hits       3304    3297    -7     
  Misses      492     492           
  Partials      1       1           
Flag Coverage Δ
unittests 86% <100%> (-1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@FrankBakkerNl
Copy link
Contributor Author

Ping @spelech I did a small change here to the types you recently added.

@FrankBakkerNl FrankBakkerNl merged commit 977d32b into net-daemon:main Sep 15, 2024
7 of 8 checks passed
@helto4real helto4real added the pr: breaking change Set it PR is breaking label Sep 15, 2024
@FrankBakkerNl FrankBakkerNl deleted the AvoidClientTypesInHassModelApi branch October 24, 2024 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants