Merged
Conversation
967f707 to
adf75f2
Compare
3a4919b to
4b2424f
Compare
4b2424f to
c1b849d
Compare
Contributor
|
NOTE: the minimum software version for the Homey pro that supports Python has been set to 0.0.0 as a placeholder. This will need to be changed to the first actual version once it is released. |
4971022 to
5d77fb9
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive Python support to Homey CLI, enabling developers to create, build, and run Python-based Homey apps alongside existing Node.js apps. The implementation introduces a factory pattern to handle different runtimes while preserving backward compatibility.
Changes:
- Introduced
AppFactoryto instantiate the correct app class based on runtime (Node.js or Python) - Added
AppPythonclass with Python-specific build, dependency management, and containerization logic - Extracted Docker operations into a reusable
DockerHelperutility class - Refactored
Appclass methods to support polymorphism across runtimes
Reviewed changes
Copilot reviewed 12 out of 36 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Added dotenv and smol-toml dependencies for Python environment and manifest parsing |
| lib/StacklessError.js | New error class that suppresses stack traces for cleaner user-facing errors |
| lib/HomeyCompose.js | Added method to create Homey Compose directory structure |
| lib/DockerHelper.js | New utility class extracting Docker operations from App.js |
| lib/AppPython.js | New class implementing Python app lifecycle management |
| lib/AppFactory.js | New factory class to instantiate appropriate app class based on runtime |
| lib/App.js | Refactored to extract Docker logic and support runtime polymorphism |
| assets/templates/app/widgets/api.py | Python template for widget API endpoints |
| assets/templates/app/drivers/driver.py | Python template for driver implementation |
| assets/templates/app/drivers/device.py | Python template for device implementation |
| assets/templates/app/app.py | Python template for main app class |
| .github/CODEOWNERS | Removed empty CODEOWNERS file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
Depends on athombv/node-homey-lib#639 |
Simplifies compatibility logic by only requiring the API version to be 3, allowing broader support for Python apps on Homey devices regardless of platform version.
Removes reference to Homey Cloud in the error message to accurately reflect that Python apps are unsupported only on Homey Pro (2016—2019), improving clarity for users.
…ture/python # Conflicts: # package-lock.json # package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds functionality to run Python-based apps with Homey CLI.