Skip to content

Conversation

@x00Pavel
Copy link
Contributor

@x00Pavel x00Pavel commented Jul 22, 2023

Proposed change

Add base interfaces for generated Entities.

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 functionality is discussed in Discord thread Entity interfaces in NetDaemon

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the [development checklist][dev-checklist]
  • The code compiles without warnings (code quality chek)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@x00Pavel
Copy link
Contributor Author

I've removed all methods from the interface to simplify the PR. To have empty interfaces is enough to fulfill needs of my request.

@x00Pavel
Copy link
Contributor Author

btw should I squash all commits?

@FrankBakkerNl
Copy link
Contributor

You can, but eventually we will squash commit the whole PR anyway. Keeping then separate at first makes reviewing changes easier

@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Patch coverage: 97.72% and project coverage change: +0.17% 🎉

Comparison is base (70e4472) 79.80% compared to head (1ff3acb) 79.98%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #897      +/-   ##
==========================================
+ Coverage   79.80%   79.98%   +0.17%     
==========================================
  Files         174      174              
  Lines        3407     3437      +30     
  Branches      436      440       +4     
==========================================
+ Hits         2719     2749      +30     
  Misses        502      502              
  Partials      186      186              
Flag Coverage Δ
unittests 79.98% <97.72%> (+0.17%) ⬆️

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

Files Changed Coverage Δ
...l.CodeGenerator/CodeGeneration/HelpersGenerator.cs 100.00% <ø> (ø)
....HassModel.CodeGenerator/CodeGenerationSettings.cs 80.00% <ø> (ø)
...n.HassModel/Entities/EnumerableEntityExtensions.cs 87.50% <ø> (ø)
...l/NetDeamon.HassModel/Entities/EntityExtensions.cs 60.00% <83.33%> (+15.55%) ⬆️
....CodeGenerator/CodeGeneration/EntitiesGenerator.cs 100.00% <100.00%> (ø)
...erator/CodeGeneration/ExtensionMethodsGenerator.cs 98.03% <100.00%> (ø)
...or/MetaData/EntityMetaData/EntityDomainMetadata.cs 100.00% <100.00%> (ø)
...c/HassModel/NetDeamon.HassModel/Entities/Entity.cs 81.25% <100.00%> (+4.58%) ⬆️
...odel/NetDeamon.HassModel/Entities/NumericEntity.cs 56.25% <100.00%> (ø)

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

Copy link
Collaborator

@helto4real helto4real left a comment

Choose a reason for hiding this comment

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

Just some small stuff to fix before merge if you want to. I approve and let me know when it is ready for merge.

yield return AttributeTypeGenerator.GenerateAttributeRecord(domainMetadata);
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ther should be one line between functions.

namespace Debug.apps.HassModel.MyInterfaceAutomation;

[NetDaemonApp]
[Focus]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove Focus attribute before merge

@helto4real
Copy link
Collaborator

I got the answer from Frank regarding the docs removal. Rest is not important to fix. Merging

@helto4real helto4real merged commit 5ff1741 into net-daemon:dev Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants