-
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
Merged
Merged
Changes from 180 commits
Commits
Show all changes
191 commits
Select commit
Hold shift + click to select a range
a5d7fba
Setup basic vscode extension skeleton
marwan37 7e064a8
Add CONTRIBUTING.md file for zenml vscode extension
marwan37 7ef69d2
Add status bar that displays the currently active stack
marwan37 ecfd9c3
Add tests for status bar functionality
marwan37 1d2a4ec
Add setup/contributing guide directly to README file
marwan37 0541e9a
Update README: Clarify ZenML stack setup and CLI command execution ou…
marwan37 1e9ae09
Fix parsing of quoted stack names when getting active stack
marwan37 70ba401
Remove CHANGELOG.md file
marwan37 e953e55
Rename zenml-studio to zenml
marwan37 4659063
Merge quickstart guide relevant info into README file
marwan37 31f53a1
Remove redundant comments about parsing the output in statusBar.ts
marwan37 1c8a8e9
Update README: Clarify ZenML VSCode extension functionality and integ…
marwan37 9f99c48
Add info regarding click-to-refresh for the status bar
marwan37 305c7ce
Add python scripts integrating zenml python client
marwan37 9fe0ad8
Refactor stackCommands to run the python script instead of the cli
marwan37 f5e8fba
Add serverCommands to check the server status using the python client
marwan37 b6f2b4f
Update Shell class to integrate environment checks and python script …
marwan37 6027054
Add tests for shell and serverCommands and update previous ones to re…
marwan37 9e95887
Add configuration block for venvPath, and sinon package
marwan37 6982e56
Register server command in extension
marwan37 202b73b
Delete helpers file as parsing output is no longer needed
marwan37 fea58b2
Update status bar to display server status icon, with stack name only
marwan37 ac4be27
Refactor check_server_status script to use get_active_server_details …
marwan37 939afec
Update files to reflect changes to data structure returned by python …
marwan37 41e86b1
Update README to reflect recent changes, limitations, and upcoming fe…
marwan37 e3d4dfa
Refactor: Centralize script path resolution in Shell class
marwan37 2cb4cbf
Add commands to allow for connecting to remote servers and disconnect…
marwan37 bf15a54
Add two view containers for 'Server' and 'Stacks' with tree items
marwan37 a7fd6cd
Add service to centralize checking of server status for the status an…
marwan37 a1b67d3
Add python scripts to fetch stacks, get store config, and connect/dis…
marwan37 ec8808a
Update serverCommands test to use alias 'isConnected'
marwan37 351f069
Register stack and server tree views, and add commands for server con…
marwan37 127adcb
Add ZenML logo for Activity Bar
marwan37 9a81241
Abstract away path manipulations from commands into the Shell class
marwan37 b6200fb
Add new commands, viewsContainers, activityBar, and menus to 'contrib…
marwan37 d717b28
Refactor: remove print statements and set is_connected to false if st…
marwan37 f82a5b4
Add loading indicator while disconnecting and refresh server status a…
marwan37 30678f0
Update README to include new Activity Bar view and current extension …
marwan37 d93100e
Refactor:
marwan37 7e237cf
Fix typo in file name
marwan37 68cbb76
Add getter method to ServerStatusService to simplify testing
marwan37 1bee5c9
Refactor codebase: Add JSDoc comments, fix imports, and organize types
marwan37 8ec6008
Implement coderabbit suggestions for shell tests, and error handling …
marwan37 855e055
Introduce pipeline view to display pipeline runs
marwan37 dff8eac
Replace server/stack management commands using the ZenML FastAPI server
marwan37 a547572
Update server data provider and tree items to reflect new server stat…
marwan37 0e494ec
Delete no longer needed python directory and scripts
marwan37 761dcf9
Replace server/stack management commands using the ZenML FastAPI server
marwan37 c307ecf
Update server data provider and tree items to reflect new server stat…
marwan37 9e15470
Update stack data provider and tree items to reflect FastAPI integrat…
marwan37 252234b
Remove auto-refresh/polling of server status and add reset/reactivate…
marwan37 0732a31
Update types for Stack and Server to reflect latest structure, and ad…
marwan37 7c7cfd5
Add tests for new stack commands and update server commands tests
marwan37 3b7cd8c
Remove python from directory path when getting a script path
marwan37 a43a1a4
Add exports for the PipelineDataProvider and PipelineTreeItems
marwan37 00ee953
Update status bar to reflect changes to the getActiveStack function
marwan37 c035195
Update extension.ts to initiate device authorization and store the us…
marwan37 29d714e
Add new commands, views, configurations to package.json
marwan37 5a58407
Update README.md to reflect latest state of the extension
marwan37 4f998ca
Add ZenMLClient class for streamlined API interactions
marwan37 fd6c136
Setup GitHub workflow for automated testing on PRs and pushes
marwan37 e943565
Fix linting errors
marwan37 441b0b4
Adjust getConfiguration call to zenml instead of zenml-io.zenml
marwan37 e88bffd
Remove extra whitespaces and fix typos
marwan37 3a99c25
Add step-wise error handling for stack commands - from codeRabbit
marwan37 bcdebda
Add copyright notice to Shell.ts file
marwan37 18afd70
Update src/utils/Shell.ts
marwan37 05f3026
Update src/utils/Shell.ts
marwan37 ed4a691
Add backoff strategy in the polling for Access token function – from …
marwan37 fc5a339
Update README.md
marwan37 2210d2a
Add JSDoc for functions in server/utils.ts
marwan37 d20ecce
Add error typing in stack/cmds.ts
marwan37 19df64b
Remove logout from disconnectFromZenMLServer as its not needed to dis…
marwan37 ead1cf4
Run format/lint on all files
marwan37 80a0ab7
Validate script filenames and sanitize arguments in Shell class – fro…
marwan37 1339ce5
Validate the server URL format before storing – from codeRabbit
marwan37 b618176
Simplify data handling by eliminating redundant JSON.parse in stack u…
marwan37 87c8b96
Rename shell.test.ts to Shell.test.ts and update tests for JSON outpu…
marwan37 59b7e3c
Adjust Shell.test.ts tests for direct JSON output parsing
marwan37 8cd1987
Integrate VSCode's Python Tool Extension and template
marwan37 665a36d
Add noxfile for python environment management and python_tests folder…
marwan37 9b23685
Implement new event-driven architecture with EventBus and LSClient
marwan37 2eac5f4
Refine activation process via ExtensionEnvironment for Python tool in…
marwan37 6191ead
Add type definitions for all components and responses from the lsp se…
marwan37 57b95a9
Remove Shell and ZenMLClient classes, replace ServerStatusService wit…
marwan37 c55e6c9
Integrate LSP commands across all components and remove obsolete oper…
marwan37 d6dde38
Refactor data providers in activity bar views for LSP server compatib…
marwan37 800bdac
Remove obsolete ServerStatusService.ts file
marwan37 aa0ccc5
Refactor extension activation and deactivation to integrate python to…
marwan37 a2e2204
Refactor StackTypes
marwan37 650dc0a
Add global, notifications, and refresh helper utils
marwan37 047fd92
Expand test suites for new features and Python LSP server integration
marwan37 928d337
Move HydratedTypes to types directory
marwan37 02512c5
General enhancements and codebase refinement for better integration a…
marwan37 c7c1010
Remove notification/info message for zenml/ready, only notify if requ…
marwan37 1e2cc16
Use optional chaining and nullish coalescing operator to provide fall…
marwan37 acdf5d2
Implement zenml/ready event handling and server status refresh on UI …
marwan37 380fc57
Update README.md to reflect recent integration, changes, and new feat…
marwan37 47b17a5
Add notification when zenml is ready and meets requirements for debug…
marwan37 528279c
Run format/lint scripts
marwan37 8d64d07
Add .vscode folder with launch and task configurations for easier setup
marwan37 3e83db3
Refactor repetitive code for LSP commands into a decorator that chec…
marwan37 eeac6ae
Add commands/views disposables porperty to ExtensionEnvironment, and …
marwan37 9d6f90c
rename pytool-module to zenml-python to differentiate between typescr…
marwan37 217c050
Refactor language server setup and relax ZenML client init criteria
marwan37 c27dbdd
Enhance handling of Python environments and interpreter selection
marwan37 41b8fc3
Update command registrations for servers, pipelines, and stacks
marwan37 b136cb1
Refine UI components and event handling for smoother interactions
marwan37 2824d6e
Update utils to help with tests
marwan37 884797a
Initialize EventBus in extension.ts and streamline package.json commands
marwan37 6d38da4
Update test suite and mocks to align with latest extension and server…
marwan37 bbbe42a
Specify timeout for subprocess in lsp_zenml.py to avoid hanging
marwan37 770749f
Refactor version check following CodeRabbit's suggestion
marwan37 6e528a7
Add flexible method in LSClient to abstract LSP command requests
marwan37 6dfa2c5
Remove debug notifications from lsp_server.py
marwan37 9b55638
Update MockLSClient with sendLsClientRequest method, and integrate ch…
marwan37 49b1d17
Add license field to package.json
marwan37 e48795a
Run format on all typescript and json files
marwan37 d857469
Fix linting errors, document and re-orgnaize bundled/tool python files
marwan37 d28213e
Improved logging suppression during dynamic/lazy imports
marwan37 6d3faa7
Separate stack and component fetching
marwan37 d29b198
Improve docs for lazy_import.py and suppress log noise when executing…
marwan37 e9ee383
Remove unnecessary event listeners and notifications for background r…
marwan37 4788dee
Rename ZenML Python to ZenML, and cleanup console logs
marwan37 423e781
Refactor LSClient for direct config updates and optimize event handling
marwan37 f3969a4
Optimize file watcher for minimal notifications and improve utility f…
marwan37 511dc5d
Update command utilities and UI views for better stack and server han…
marwan37 085c498
Refine ServerInfoTypes and update package.json for new file watcher c…
marwan37 fd38cfc
Adjust tests and MockLSClient for updated ServerDataProvider logic
marwan37 d580a8c
Run format on all ts files and remove unused imports
marwan37 0528363
Refactor codebase for improved testability and implement minor optimi…
marwan37 d9c427a
Run format/lint on all ts files
marwan37 531c2a9
Prompt user for python interpreter if ZenML isntallation not found, a…
marwan37 86a541c
Run format/lint scripts
marwan37 8f3bcd2
Add info popup letting users know ZenML installation was found
marwan37 470c2a3
Prevent re-prompting for interpreter on cancellation and refine feedb…
marwan37 cadb8c4
Refactor ZenML LSP server initialization and checks
marwan37 c6e96ce
Move global config watcher to zen_watcher.py as ZenConfigWatcher
marwan37 f52ba64
Implement async checks for ZenML installation in lsp_zenml.py
marwan37 92945dd
Clean up activation logic, only restart server in ZenExtension's prom…
marwan37 0534f2d
Clean up main extension.ts, and adjust other files to integrate chang…
marwan37 a113de5
Implement coderabbit suggestions to improve config watcher, add const…
marwan37 a297c5c
Correct constant names, and only register pytool commands once zenml …
marwan37 445b42e
Improve interpreter selection logic to await ZenML readiness post-ser…
marwan37 abd4098
Adjust context manager to only suppress stdout when executing LSP com…
marwan37 8eca9dc
Run format/lint scripts and add lint script
marwan37 6ddd431
Update scripts/lint.sh to exit if the directory change fails
marwan37 cab059e
Update scripts/lint.sh to separate the declaration and assignment of …
marwan37 7c85f43
Dynamically get cwd of workspace rather than hardcoding a slash durin…
marwan37 6b7ef10
Update README with more details for usage, development, and troublesh…
marwan37 d12dfd3
Add ZenML environment view to activity bar (for python interpreter an…
marwan37 e693d78
update all commands with decorator
marwan37 de7b942
Add script to clear cache and recompile
marwan37 6189b7b
Rely on onDidChangePythonInterpreter handler to restart the server af…
marwan37 a6add5e
Add package.nls.json for documentation purposes and remove unused com…
marwan37 16ffbdc
Update Environment data provider, items, and commands
marwan37 716e98f
Refactor
marwan37 b6b6996
Update language server implementation and supporting tooling
marwan37 236a91b
Run format/lint scripts
marwan37 e20a57e
Add safety checks to prevent potential script errors – from coderabbit
marwan37 001ea85
Add comment to clarify event handler will trigger the LSP restart aft…
marwan37 88f3343
Update README with new environment view details
marwan37 ee537fd
Refactor zenml_wrappers.py for compatibility with ZenML v0.55.0+, sto…
marwan37 615c91a
Add setInterpreter command to environmentview's interpreter tree items
marwan37 94034ab
Increase timeout to 20 seconds for extension launch in .vscode/launch…
marwan37 f278310
Make url clickable, and improve error handling
marwan37 e3f05fd
fetch all stacks, rather than by page, and improve error handling
marwan37 4866569
send events for lsClient, zenmlClient readiness and state to show rel…
marwan37 d182b71
Add new types for error tree items, and add new test for the ServerDa…
marwan37 282ca8f
Run format/lint scripts
marwan37 cee352c
Add pagination to allow fetching stacks in batches of 20, until total…
marwan37 d1468a3
Add option to set max items per page for stacks
marwan37 c19000f
Allow setting max pipeline run items per page, and list by most recen…
marwan37 b18bcfe
Add command tree items for next/prev pipeline runs
marwan37 46f29fa
Remove preview=true from package.json, and add missing commands to pa…
marwan37 481d8a9
Add details to package.json to prepare for publishing
marwan37 286857a
add gif to readme
strickvl e512dba
use publisher ID
strickvl 8b8c891
use publisher ID everywhere
strickvl 0ebe969
Edit readme
marwan37 a651a22
Update README.md
marwan37 3a2c4c3
fix typo
strickvl 0174aa9
Merge branch 'python-lsp-integration' of https://github.com/marwan37/…
strickvl 89b2ab3
add license shield
strickvl 4aaae68
Add installation and version requirements for ZenML extension
strickvl 31157c6
Small change
strickvl d3a0bca
add links
strickvl 7e524ab
display active stack in status bar again
marwan37 2985e77
Add contributing.md
marwan37 038cb22
edit contrib
marwan37 b3a663f
Small nits for contributing document
strickvl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 12, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"], | ||
|
||
"rules": { | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"@typescript-eslint/consistent-type-definitions": ["error", "type"] | ||
}, | ||
|
||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/naming-convention": [ | ||
"warn", | ||
{ | ||
"selector": "import", | ||
"format": ["camelCase", "PascalCase"] | ||
} | ||
], | ||
"@typescript-eslint/semi": "warn", | ||
"curly": "warn", | ||
"eqeqeq": "warn", | ||
"no-throw-literal": "warn", | ||
"semi": "off" | ||
}, | ||
"ignorePatterns": ["out", "dist", "**/*.d.ts"] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: VSCode Extension CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18.x' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build VSCode Extension | ||
run: npm run compile | ||
|
||
- name: Run VSCode Extension Formatter | ||
run: npm run format | ||
|
||
- name: Run VSCode Extension Linter | ||
run: npm run lint | ||
|
||
- name: Run headless test | ||
uses: coactions/setup-xvfb@v1 | ||
with: | ||
run: npm test |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.DS_Store | ||
Thumbs.db | ||
.vscode-test/ | ||
.idea/ | ||
.eslintcache | ||
lib-cov | ||
*.log | ||
*.log* | ||
pids | ||
|
||
# Node | ||
.npm/ | ||
node_modules/ | ||
package-lock.json | ||
npm-debug.log | ||
|
||
# Build outputs | ||
dist/ | ||
out/ | ||
build/ | ||
*.tsbuildinfo | ||
.history/ | ||
|
||
# env | ||
.env | ||
.env* | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# From vscode-python-tools-extension-template | ||
*.vsix | ||
.venv/ | ||
.vs/ | ||
.nox/ | ||
bundled/libs/ | ||
**/__pycache__ | ||
**/.pytest_cache | ||
**/.vs | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"proseWrap": "preserve", | ||
"singleQuote": true, | ||
"arrowParens": "avoid", | ||
"trailingComma": "es5", | ||
"bracketSpacing": true | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[MESSAGES CONTROL] | ||
disable= | ||
C0103, # Name doesn't conform to naming style | ||
C0415, # Import outside toplevel | ||
W0613, # Unused argument | ||
R0801, # Similar lines in multiple files | ||
R0903, # Too few public methods |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { defineConfig } from '@vscode/test-cli'; | ||
|
||
export default defineConfig({ | ||
files: 'out/test/**/*.test.js', | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"amodio.tsl-problem-matcher", | ||
"ms-vscode.extension-test-runner" | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// A launch configuration that compiles the extension and then opens it inside a new window | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Run Extension", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"args": ["--extensionDevelopmentPath=${workspaceFolder}"], | ||
"outFiles": ["${workspaceFolder}/dist/**/*.js"], | ||
"preLaunchTask": "${defaultBuildTask}", | ||
"timeout": 20000 | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"python.defaultInterpreterPath": "", | ||
"files.exclude": { | ||
"out": false, // set this to true to hide the "out" folder with the compiled JS files | ||
"dist": false // set this to true to hide the "dist" folder with the compiled JS files | ||
}, | ||
"search.exclude": { | ||
"out": true, // set this to false to include "out" folder in search results | ||
"dist": true // set this to false to include "dist" folder in search results | ||
}, | ||
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts | ||
"typescript.tsc.autoDetect": "off", | ||
"python.testing.pytestArgs": ["src/test/python_tests"], | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true, | ||
"python.testing.cwd": "${workspaceFolder}", | ||
"python.analysis.extraPaths": ["bundled/libs", "bundled/tool"] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "watch", | ||
"problemMatcher": "$ts-webpack-watch", | ||
"isBackground": true, | ||
"presentation": { | ||
"reveal": "never", | ||
"group": "watchers" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"type": "npm", | ||
"script": "watch-tests", | ||
"problemMatcher": "$tsc-watch", | ||
"isBackground": true, | ||
"presentation": { | ||
"reveal": "never", | ||
"group": "watchers" | ||
}, | ||
"group": "build" | ||
}, | ||
{ | ||
"label": "tasks: watch-tests", | ||
"dependsOn": ["npm: watch", "npm: watch-tests"], | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"type": "npm", | ||
"script": "compile", | ||
"group": "build", | ||
"problemMatcher": [], | ||
"label": "npm: compile", | ||
"detail": "webpack" | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
out/** | ||
node_modules/** | ||
src/** | ||
.gitignore | ||
.yarnrc | ||
webpack.config.js | ||
vsc-extension-quickstart.md | ||
**/tsconfig.json | ||
**/.eslintrc.json | ||
**/*.map | ||
**/*.js.map | ||
**/*.ts | ||
**/.vscode-test.* |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,43 @@ | ||
# vscode-zenml | ||
VSCode extension for ZenML | ||
|
||
![](resources/zenml-extension.gif) | ||
|
||
The ZenML VSCode extension seamlessly integrates with the ZenML CLI to enhance your MLOps workflow within VSCode. It is designed to accurately mirror the current state of your ZenML environment within your IDE, ensuring a smooth and integrated experience. | ||
|
||
## Features | ||
|
||
- **Server, Stacks, and Pipeline Runs Views**: Interact directly with ML stacks, pipeline runs, and server configurations from the Activity Bar. | ||
- **Python Tool Integration**: Utilizes a Language Server Protocol (LSP) server for real-time synchronization with the ZenML environment. | ||
- **Real-Time Configuration Monitoring**: Leverages `watchdog` to dynamically update configurations, keeping the extension in sync with your ZenML setup. | ||
- **Status Bar Indicators**: Display the current stack name and connection status. | ||
|
||
## Getting Started | ||
|
||
1. **Install the Extension**: Search for "ZenML" in the VSCode Extensions view (`Ctrl+Shift+X`) and install it. | ||
2. **Connect to ZenML Server**: Use the `ZenML: Connect` command to connect to your ZenML server. | ||
3. **Explore ZenML Views**: Navigate to the ZenML activity bar to access the Server, Stacks, and Pipeline Runs views. | ||
|
||
## Using ZenML in VSCode | ||
|
||
- **Manage Server Connections**: Connect or disconnect from ZenML servers and refresh server status. | ||
- **Stack Operations**: View stack details, rename, copy, or set active stacks directly from VSCode. | ||
- **Pipeline Runs**: Monitor and manage pipeline runs, including deleting runs from the system. | ||
- **Environment Information**: Get detailed snapshots of the development environment, aiding troubleshooting. | ||
|
||
## Requirements | ||
|
||
- **ZenML Installation:** ZenML needs to be installed in the local Python environment associated with the Python interpreter selected in the current VS Code workspace. This extension interacts directly with your ZenML environment, so ensuring that ZenML is installed and properly configured is essential. | ||
- **ZenML Version**: To ensure full functionality and compatibility, make sure you have ZenML version 0.55.0 or newer. | ||
- **Python Version**: Python 3.8 or greateris required for the operation of the LSP server, which is a part of this extension. | ||
marwan37 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Feedback and Contributions | ||
|
||
Your feedback and contributions are welcome! Please refer to our [contribution guidelines](https://github.com/zenml-io/vscode-zenml/CONTRIBUTING.md) for more information. | ||
|
||
## License | ||
|
||
Apache-2.0 | ||
|
||
--- | ||
|
||
ZenML © 2024, ZenML. Released under the [Apache-2.0 License](LICENSE). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright (c) ZenML GmbH 2024. All Rights Reserved. | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at: | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. See the License for the specific language governing | ||
# permissions and limitations under the License. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Copyright (c) ZenML GmbH 2024. All Rights Reserved. | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at: | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. See the License for the specific language governing | ||
# permissions and limitations under the License. | ||
|
||
"""Debugging support for LSP.""" | ||
|
||
import os | ||
import pathlib | ||
import runpy | ||
import sys | ||
|
||
|
||
def update_sys_path(path_to_add: str) -> None: | ||
"""Add given path to `sys.path`.""" | ||
if path_to_add not in sys.path and os.path.isdir(path_to_add): | ||
sys.path.append(path_to_add) | ||
|
||
|
||
# Ensure debugger is loaded before we load anything else, to debug initialization. | ||
debugger_path = os.getenv("DEBUGPY_PATH", None) | ||
if debugger_path: | ||
if debugger_path.endswith("debugpy"): | ||
debugger_path = os.fspath(pathlib.Path(debugger_path).parent) | ||
|
||
# pylint: disable=wrong-import-position,import-error | ||
import debugpy | ||
|
||
update_sys_path(debugger_path) | ||
|
||
# pylint: disable=wrong-import-position,import-error | ||
|
||
# 5678 is the default port, If you need to change it update it here | ||
# and in launch.json. | ||
debugpy.connect(5678) | ||
|
||
# This will ensure that execution is paused as soon as the debugger | ||
# connects to VS Code. If you don't want to pause here comment this | ||
# line and set breakpoints as appropriate. | ||
debugpy.breakpoint() | ||
|
||
SERVER_PATH = os.fspath(pathlib.Path(__file__).parent / "lsp_server.py") | ||
# NOTE: Set breakpoint in `lsp_server.py` before continuing. | ||
runpy.run_path(SERVER_PATH, run_name="__main__") |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright (c) ZenML GmbH 2024. All Rights Reserved. | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at: | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. See the License for the specific language governing | ||
# permissions and limitations under the License. | ||
|
||
"""Constants for ZenML Tool""" | ||
|
||
TOOL_MODULE_NAME = "zenml-python" | ||
TOOL_DISPLAY_NAME = "ZenML" | ||
MIN_ZENML_VERSION = "0.55.0" | ||
|
||
"""Constants for ZenML Notifications and Events""" | ||
|
||
IS_ZENML_INSTALLED = "zenml/isInstalled" | ||
ZENML_CLIENT_INITIALIZED = "zenml/clientInitialized" | ||
ZENML_SERVER_CHANGED = "zenml/serverChanged" | ||
ZENML_STACK_CHANGED = "zenml/stackChanged" | ||
ZENML_REQUIREMENTS_NOT_MET = "zenml/requirementsNotMet" |
Oops, something went wrong.
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.
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
ecmaVersion
is set to 6, which seems outdated given the project's use of modern JavaScript features. Consider updating it to a more recent version that aligns with the project's technology stack, such as2022
.Committable suggestion