-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support settings of custom project path in Kedro Extension #162
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Jitendra Gundaniya <[email protected]>
Hey @jitu5, I've tested this manually and it seems to work, when I use the new command and open viz it displays the kedro project but it doesn't open its workspace. |
Signed-off-by: Jitendra Gundaniya <[email protected]>
@SajidAlamQB If the user-supplied Kedro project path's folder is not part of the currently open workspace in VSCode, the extension will add it to the workspace explorer as part of a multi-root workspace, alongside any existing folders. Please re test it and let me know. |
Hey @jitu5 I've tested this manually and its working well. If understood does it now create a new workspace with the existing and selected projects. |
@SajidAlamQB Yes it create a new workspace with existing and selected project. |
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.
Hey Jitendra, thanks for this, I've tested it out manually and it all seems to work, I understand what you mean sometimes we need to reload window for it to fully initialise. Is there a way to trigger this after successful use of setting custom project? Otherwise we can document this clearly for users.
Signed-off-by: Jitendra Gundaniya <[email protected]>
@SajidAlamQB I fixed this issue, now no need to use reload window after setting custom Kedro project. could you please test it again. thanks. |
Signed-off-by: Jitendra Gundaniya <[email protected]>
Description
Resolves #19
This pull request introduces a new feature to allow setting a custom path to the Kedro project root directory through the configuration. The changes span multiple files to integrate this new feature into the existing system.
How to set Kedro project path
Cmd + Shift + P
Kedro: Set Project Path
or
cmd + ,
Kedro: Set Project Path
field with your absolute path to Kedro projectNote
If the user-supplied Kedro project path's folder is not part of the currently open workspace in VSCode, the extension will add it to the workspace explorer as part of a multi-root workspace, alongside any existing folders.
User flow
Development notes
Refactor extension.ts:
src/extension.ts
: Refactored extension.ts by taking out runServer.ts and registerCommandsAndEvents.ts from it.Enhancements to Kedro Project Path Handling:
bundled/tool/lsp_server.py
: Updated methods to utilizekedroProjectPath
from workspace settings if available, enhancing flexibility in project path configuration. [1] [2] [3]package.json
: Added configuration forkedro.kedroProjectPath
and a new commandkedro.kedroProjectPath
for setting the Kedro project path. [1] [2]Command and Event Registration:
src/common/activationHelper.ts
: Registered new commands and events, including the command to set the Kedro project path.Utility and Helper Functions:
src/common/commands.ts
: Added a function to set the Kedro project path and updated environment selection to consider the new path setting. [1] [2]src/common/utilities.ts
: Enhanced utility functions to check and get Kedro project paths, ensuring they respect the new configuration. [1] [2] [3] [4]Configuration and Settings:
src/common/settings.ts
: IncludedkedroProjectPath
in the settings interface and related functions, allowing it to be retrieved and checked for changes. [1] [2] [3] [4]QA notes
Keep your Kedro project in below folder structure
Copy your absolute path to Kedro project,
/Users/Jitendra_Gundaniya/root/folder1/kedroProject
Checklist