-
Notifications
You must be signed in to change notification settings - Fork 905
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
Kedro Language Server for VSCode to make navigation easier #3691
Comments
I have started to work on it this week, so far my top priority is getting it packaged properly so I can easily ask someone to test it out.
Essentially I need a magic function look like this: def find_config(some_string): # the string will be where the cursor at the IDE
# Figure out which environment should be used
# Figure out is it a `params` or `dataset`
# Figure out what is the value of it
# Figure out where is the source of the value, which file and line_no i.e. conf/base/parameters.yml:1-3
# Is it in base/parameters.yml or local/parameters.yml or `base/parameters_data_science.yml`?
# return a structured response
Approach 1 - Navigation to a unresolved version
This could be tricky because it seems that Approach 2 - Navigation to a Resolved version of configThis approch is simpler for the LSP, but requires Approach 1 is arguably favoring the "read" and approach 2 is favoring the "write" |
Just had a really great demo from @noklam on this:
Focus on that for MVP state and we're in business 💪 |
This plugin now exists 🎉 https://marketplace.visualstudio.com/items?itemName=kedro.Kedro We addressed some bugs in the first releases but the next steps here are
I'm closing this issue as "complete" 🔶 well done @noklam! |
In the future we'll continue addressing the technical challenges @noklam exposed in #3691 (comment) to make the implementation more robust |
Introduction
Slack: https://kedro-org.slack.com/archives/C03R8N2M8KT/p1709892536797619
This ticket is a proposal to create a VSCode Plugin for Kedro, the goal of this plugin is to improve the developer experience and lower the learning curve of Kedro. It can also be a good driver for 0.19 adoption.
Background
Related: #2821
Kedro has an opinionated project structure and often users need to interact with multiple files includes:
The reason for this is Kedro unique DataCatalog, Node and Pipeline, it uses "string" in these files, and thus traditional IDE features like navigation, static analysis is not possible.
Problem
The problem is quite obvious, using Kedro requires some muscle memory to understand which files to edit and jumping between multiple files is not uncommon. It's natural to use IDE to aid for traditional software development.
What's in scope
What's not in scope
Measure of success
To measure the usage of this plugin is pretty straightforward, we don't need extra telemetry. PyPi package download stats and VSCode Extension download stats should be sufficient.
Design
https://pypi.org/project/kedro-lsp/ This is not a new idea, and indeed a PoC was implemented during 0.17.x series. The idea is implementing a Kedro Language Server, and a client (in this case, a VSCode extension).
The plugin may also need to support custom configuration for runtime only config:
Challenges
Challenge 1 - Resolve Origin of Configuration
Related:
I was working on a project called
kedro-inspect
a while ago, which aims to inspect a Kedro project and answer questions such as:The question of "Where is this configuration coming from" is crucial for this plugin in order to make IDE navigation works seamlessly.
Challenge 2 - limited support for dynamic pipeline
Most IDE feature work more or less on static information.
Alternatives considered
Do nothing or get rid of the "string" thing in Kedro so everything is a Python object and doesn't requires extra implementation. Earlier research suggest most user prefer using YAML instead of Python for configuration though.
Testing
TBD
Rollout strategy
This plugin will not be backward compatible and only works for 0.19+. On the other hand, any bugs or broken feature shouldn't poses concern for users as it's likely the IDE just doesn't respond.
Future iterations
See "What's not in scope", handle dynamic generated configuration betters.
The text was updated successfully, but these errors were encountered: