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

Adds future new AppModel to the NetDaemon project #556

Merged
merged 31 commits into from
Jan 13, 2022
Merged

Adds future new AppModel to the NetDaemon project #556

merged 31 commits into from
Jan 13, 2022

Conversation

helto4real
Copy link
Collaborator

@helto4real helto4real commented Dec 19, 2021

Breaking change

Proposed change

This is the new AppModel in NetDaemon that will replace the NetDaemon one eventually. This model has a much clearer purpose to handle application lifecykle and configuration for NetDaemon apps if or not if they use HassModel.
This is what is added:

  • New application lifecycle management that has better design
  • New configuration model that uses standard c# dotnet configuration that are injected into apps
  • Support both dynamic compiled apps and statically compiled apps
  • Inject convertable types from string in config
  • Comment all public interfaces and classes
  • Add Hosts and docker images for v3 standard and add-on
  • Support add services to apps in this model too

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
  • 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:

@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2021

Codecov Report

Merging #556 (71a9949) into dev (786e7d0) will increase coverage by 19.16%.
The diff coverage is 91.20%.

Impacted file tree graph

@@             Coverage Diff             @@
##              dev     #556       +/-   ##
===========================================
+ Coverage   62.60%   81.77%   +19.16%     
===========================================
  Files         179      114       -65     
  Lines        6667     3034     -3633     
  Branches      930      319      -611     
===========================================
- Hits         4174     2481     -1693     
+ Misses       2157      423     -1734     
+ Partials      336      130      -206     
Flag Coverage Δ
unittests 81.77% <91.20%> (+19.16%) ⬆️

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

Impacted Files Coverage Δ
...ient/Internal/Extensions/CancellationExtensions.cs 100.00% <ø> (ø)
...n.HassClient/Internal/Extensions/JsonExtensions.cs 84.61% <ø> (ø)
...sClient/Internal/HomeAssistantConnectionFactory.cs 100.00% <ø> (ø)
...ssClient/Internal/Json/HassDeviceModelConverter.cs 54.54% <0.00%> (-12.13%) ⬇️
...mon.HassClient/Internal/Net/WebSocketClientImpl.cs 68.42% <64.51%> (-7.45%) ⬇️
...el/Internal/Config/Yaml/YamlConfigurationSource.cs 75.00% <75.00%> (ø)
...tDaemon.HassClient/Internal/HomeAssistantRunner.cs 88.29% <76.31%> (-5.19%) ⬇️
...n.AppModel/Internal/Config/ConfigurationBinding.cs 80.76% <80.76%> (ø)
...mon.HassClient/Internal/HomeAssistantApiManager.cs 84.61% <80.76%> (-1.10%) ⬇️
...etDaemon.HassClient/Internal/Helpers/HttpHelper.cs 80.00% <85.71%> (+11.57%) ⬆️
... and 95 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 786e7d0...71a9949. Read the comment docs.

@helto4real helto4real force-pushed the app_model branch 6 times, most recently from 0da6e8b to 8f96726 Compare December 19, 2021 20:38
@helto4real helto4real marked this pull request as ready for review December 25, 2021 08:33
@helto4real helto4real marked this pull request as draft December 25, 2021 08:57
FrankBakkerNl pushed a commit to FrankBakkerNl/netdaemon that referenced this pull request Dec 26, 2021
@helto4real helto4real force-pushed the app_model branch 3 times, most recently from 12b77e7 to 82bb4b4 Compare January 5, 2022 15:40
helto4real and others added 9 commits January 6, 2022 13:21
* Added AssemblyResolvers and simple type resolvers

* Add CI to appmodel branch

* Made IAppTypeResolver internal

* Added ability to skip apps that should not load

* Support for Id in attribute

* fixed tests

* Code cleanup

* Fix cover information

* Fix the ci too
Add runtime and host projects
* HassClient cleanup

* AppModel Cleanup

* Runtime cleanup

* Host cleanup
* Error handling if exception in ctr

* formatting

* Add tests to runtime

* Add test project

* Simplify app model

* Added tests and async observable handling
* Added Application concept and AppModelContext

* Fix test to handle async
* add focus attribute support

* Add focus attribute support

* Fix tests and removed the LoadMode

* Review comments

* removed focus
* Add default serilog extension

* CI - Nuget for logging extension
@helto4real helto4real temporarily deployed to CI - release environment January 12, 2022 19:06 Inactive
@helto4real helto4real temporarily deployed to CI - release environment January 12, 2022 19:06 Inactive
@helto4real helto4real had a problem deploying to CI - release environment January 12, 2022 20:12 Failure
@helto4real helto4real had a problem deploying to CI - release environment January 12, 2022 20:12 Failure
@helto4real helto4real had a problem deploying to CI - release environment January 12, 2022 20:16 Failure
@helto4real helto4real had a problem deploying to CI - release environment January 12, 2022 20:16 Failure
@helto4real helto4real had a problem deploying to CI - release environment January 12, 2022 20:18 Failure
@helto4real helto4real had a problem deploying to CI - release environment January 12, 2022 20:18 Failure
@helto4real helto4real had a problem deploying to CI - release environment January 13, 2022 07:32 Failure
@helto4real helto4real had a problem deploying to CI - release environment January 13, 2022 07:32 Failure
@helto4real helto4real had a problem deploying to CI - release environment January 13, 2022 07:51 Failure
@helto4real helto4real had a problem deploying to CI - release environment January 13, 2022 07:51 Failure
@helto4real helto4real had a problem deploying to CI - release environment January 13, 2022 08:03 Failure
@helto4real helto4real had a problem deploying to CI - release environment January 13, 2022 08:03 Failure
@helto4real helto4real marked this pull request as ready for review January 13, 2022 08:05
@helto4real helto4real merged commit 71a9949 into dev Jan 13, 2022
@helto4real helto4real deleted the app_model branch January 13, 2022 08:08
@helto4real helto4real had a problem deploying to CI - analyze environment January 13, 2022 08:08 Failure
@helto4real helto4real had a problem deploying to CI - release environment January 13, 2022 08:08 Failure
@helto4real helto4real had a problem deploying to CI - release environment January 13, 2022 08:08 Failure
@helto4real helto4real had a problem deploying to CI - release environment January 13, 2022 16:45 Failure
@helto4real helto4real had a problem deploying to CI - release environment January 13, 2022 16:45 Failure
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.

3 participants