-
Notifications
You must be signed in to change notification settings - Fork 9
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
LSP server Integration via vscode-python-tools-extension + pivot away from FastAPI to direct ZenML library use #6
Conversation
…tside virtual environments
…connect from servers
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (7)
- bundled/tool/lsp_zenml.py (1 hunks)
- bundled/tool/zenml_wrappers.py (1 hunks)
- package.json (1 hunks)
- src/commands/pipelines/registry.ts (1 hunks)
- src/types/PipelineTypes.ts (1 hunks)
- src/views/activityBar/common/PaginationTreeItems.ts (1 hunks)
- src/views/activityBar/pipelineView/PipelineDataProvider.ts (1 hunks)
Files skipped from review as they are similar to previous changes (7)
- bundled/tool/lsp_zenml.py
- bundled/tool/zenml_wrappers.py
- package.json
- src/commands/pipelines/registry.ts
- src/types/PipelineTypes.ts
- src/views/activityBar/common/PaginationTreeItems.ts
- src/views/activityBar/pipelineView/PipelineDataProvider.ts
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (4)
- package.json (1 hunks)
- package.nls.json (1 hunks)
- src/commands/pipelines/registry.ts (1 hunks)
- src/views/activityBar/pipelineView/PipelineDataProvider.ts (1 hunks)
Files skipped from review as they are similar to previous changes (4)
- package.json
- package.nls.json
- src/commands/pipelines/registry.ts
- src/views/activityBar/pipelineView/PipelineDataProvider.ts
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (2)
- README.md (1 hunks)
- package.json (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- package.json
Additional comments: 5
README.md (5)
- 5-15: The introduction and current features sections provide a clear and comprehensive overview of the extension's capabilities and integration with the ZenML CLI. Well done on detailing these aspects.
- 17-51: The new additions and commands sections are well-detailed, providing users with clear instructions on how to utilize the new features and commands introduced in this update. Great job on this section.
- 53-115: The limitations, quick start guide, and setup instructions sections are clear and comprehensive, effectively guiding users through the initial setup and highlighting important compatibility information.
- 117-152: The usage, development, and testing instructions sections are well-organized and informative, providing users and developers with clear guidance on how to utilize, develop, and test the extension effectively.
- 154-185: The ZenML version and installation, troubleshooting, contributing, and pull requests sections are comprehensive and provide valuable information for users and contributors alike. Excellent work on compiling these helpful resources.
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (1)
- package.json (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- package.json
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.
Review Status
Actionable comments generated: 1
Configuration used: .coderabbit.yml
Files selected for processing (3)
- README.md (1 hunks)
- src/common/constants.ts (1 hunks)
- src/test/ts_tests/extension.test.ts (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- src/common/constants.ts
- src/test/ts_tests/extension.test.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…vscode-zenml into python-lsp-integration
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.
Review Status
Actionable comments generated: 1
Configuration used: .coderabbit.yml
Files selected for processing (1)
- README.md (1 hunks)
Additional comments: 3
README.md (3)
- 12-15: The features section clearly outlines the new capabilities of the ZenML VSCode extension, aligning well with the PR objectives.
- 35-37: The requirements section is updated to reflect the necessary conditions for using the ZenML VSCode extension effectively, including ZenML and Python version requirements.
- 39-47: The sections on feedback, contributions, and further assistance are well-structured, providing clear paths for community engagement and support.
README.md
Outdated
Note that you'll need to have ZenML installed in your Python environment to use | ||
this extension and your Python version needs to be 3.8 or greater. |
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.
Consider adding a comma for clarity in the sentence about Python version requirements.
- this extension and your Python version needs to be 3.8 or greater.
+ this extension, and your Python version needs to be 3.8 or greater.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Note that you'll need to have ZenML installed in your Python environment to use | |
this extension and your Python version needs to be 3.8 or greater. | |
Note that you'll need to have ZenML installed in your Python environment to use | |
this extension, and your Python version needs to be 3.8 or greater. |
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.
Review Status
Actionable comments generated: 2
Configuration used: .coderabbit.yml
Files selected for processing (3)
- CONTRIBUTING.md (1 hunks)
- README.md (1 hunks)
- src/views/statusBar/index.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- src/views/statusBar/index.ts
Note that you'll need to have [ZenML](https://github.com/zenml-io/zenml) installed in your Python environment to use | ||
this extension and your Python version needs to be 3.8 or greater. |
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.
The sentence about the Python version requirement could be improved for clarity by adding a comma.
- this extension and your Python version needs to be 3.8 or greater.
+ this extension, and your Python version needs to be 3.8 or greater.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Note that you'll need to have [ZenML](https://github.com/zenml-io/zenml) installed in your Python environment to use | |
this extension and your Python version needs to be 3.8 or greater. | |
Note that you'll need to have [ZenML](https://github.com/zenml-io/zenml) installed in your Python environment to use | |
this extension, and your Python version needs to be 3.8 or greater. |
CONTRIBUTING.md
Outdated
### Additional Resources | ||
|
||
- [ZenML VSCode Extension Repository](https://github.com/zenml-io/vscode-zenml) | ||
- [ZenML Documentation](https://docs.zenml.io) |
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.
The URL for the ZenML Documentation has been updated. Ensure it points to the correct location.
- - [ZenML Documentation](https://docs.zenml.io)
+ - [ZenML Documentation](https://zenml.io/docs)
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
- [ZenML Documentation](https://docs.zenml.io) | |
- [ZenML Documentation](https://zenml.io/docs) |
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.
### Additional Resources | ||
|
||
- [ZenML VSCode Extension Repository](https://github.com/zenml-io/vscode-zenml) | ||
- [ZenML Documentation](https://docs.zenml.io) |
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.
The URL for the ZenML Documentation is outdated. Please update it to point to the correct location.
- - [ZenML Documentation](https://docs.zenml.io)
+ - [ZenML Documentation](https://zenml.io/docs)
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
- [ZenML Documentation](https://docs.zenml.io) | |
- [ZenML Documentation](https://zenml.io/docs) |
|
||
## Troubleshooting Common Issues | ||
|
||
- Ensure all dependencies are up to date and compatible. |
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.
Consider adding hyphens to "up to date" to form the correct adjective "up-to-date".
- Ensure all dependencies are up to date and compatible.
+ Ensure all dependencies are up-to-date and compatible.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
- Ensure all dependencies are up to date and compatible. | |
Ensure all dependencies are up-to-date and compatible. |
This PR marks a significant architectural evolution, incorporating the
vscode-python-tools-extension template
to enhance TypeScript and ZenML Python library integration. Going beyond typical LSP functions like linting/formatting, it lays down a proven framework for environment and interpreter detection, and an event-driven structure that improves existing features and prepares for future updates.Rationale behind the change
Previously, we depended on FastAPI and background shell processes to interact with the ZenML Python library. This raised sustainability concerns and limited flexibility to specific ZenML versions. The new approach mitigates these issues, offers flexibility to use any local ZenML version (minimum version pending), and provides a cleaner, and more maintainable solution.
Credits to @strickvl for discovering the python tools extension and suggesting the integration.
Detailed Changes
New: Python Tool (LSP Server Side)
bundled/tool
directory.requirements.in
and managed throughnox
.lsp_server.py
file.zenml_client.py
centralizes ZenML library interactions.zenml_language_server.py
extends thepygls
LanguageServer
to include ZenML version checks and custom notifications.watchdog
to enable real-timeconfig.yaml
monitoring, maintaining extension sync with external ZenML environment or configuration adjustments.On the TypeScript Side
common
directory as recommended by the template.LSClient
class for Language Server interaction.EventBus
class, an extension ofEventEmitter
, orchestrates notifications from the LSP server.ZenExtension
class to encapsulate the new extension activation process.Demo: Syncing CLI ZenML operations with the extension automatically
Demo: Prompts to select python interpreter until the correct one with ZenML installed is detected
Summary by CodeRabbit
New Features
Enhancements
Documentation
Tests