-
Notifications
You must be signed in to change notification settings - Fork 449
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
feat(plugins): add Matter plugin support #4491
Conversation
e17838c
to
ea0e478
Compare
ea0e478
to
76fa675
Compare
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #4491 +/- ##
==========================================
- Coverage 89.19% 89.15% -0.05%
==========================================
Files 322 323 +1
Lines 21826 21850 +24
==========================================
+ Hits 19468 19480 +12
- Misses 2358 2370 +12 ☔ View full report in Codecov by Sentry. |
b7c0976
to
815b68e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a very good start, which can be followed by adding tests.
My biggest concern on the consumer side based on your example is that every time the application code changes, the Matter SDK data will be removed, and the bootstrapping process (the most resource consuming step) will be repeated from scratch. This is because the plugin and application data are maintained under the same part's build directory, which gets cleared when app sources change.
…ement update format
Also you can run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to unit tests, we'll also need a spread test to build a hello world
matter snap.
It would probably live in tests/spread/plugins/craft-parts
, but possibly in tests/spread/plugins/craft-parts/build-and-run-hello
if you can build an app that outputs 'Hello world" when executed.
- address linter errors - improve readability
* Add matter plugin unit test * Add craft parts matter plugin test * Export zap and pigweed environment variables * Fix tox linter * Improve formatting
Thank you for the review. The usage of consumer snap has been improved and added to tests. The Matter SDK plugin has now become a standalone |
Thanks for the hint! It is very helpful. |
Thanks for providing testing guidance.The unit test and spread test have been added. There is a snap using the Matter SDK plugin for spread test. In the spread test, right now it checks the Matter SDK related functionality whether the application was successfully initialized and whether the storage path was successfully replaced. I want to ensure that I understand the requirements correctly. Is it required for the app built in the spread test also to output "Hello world" when executed, or is it simply a suggested outcome? |
This PR is ready for re-review. Could you please take a look? Thanks! @syu-w @sergiusens @mr-cal @cmatsuoka |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think everything you have implemented looks really good. The plugin, unit, and spread tests are all well done. And nice work satisfying all the linters!
I echo Sergio's concern - a lot of code is required in an override-build script to build the example snap. I don't know much about Matter, but I wonder if more of that can be hidden from the user via the plugin, an extension, or both. I agree that we should have a meeting!
This reverts commit ffcd7c6.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me, thanks!
Since this plugin is experimental and there is not an established user base, I am OK with the design.
For posterity, the scope of work and design choices are covered in IENG-830.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried it locally and it seems to work fine
Co-authored-by: Sergio Schvezov <[email protected]>
@MonicaisHer - Do you mind resolving the last file conflict? After that, we can land this PR if you are ready |
make lint
?pytest tests/unit
?This PR adds a new Matter plugin which is useful for building Matter SDK based parts.
This PR could be merged once the following tasks been completed: