From ab2e4798c2670639692b2097cae7604045434b18 Mon Sep 17 00:00:00 2001 From: Nok Lam Chan Date: Mon, 8 Jul 2024 12:12:27 +0100 Subject: [PATCH] add vscode mentions (#3898) * add vscode mentions Signed-off-by: Nok Lam Chan * add gif Signed-off-by: Nok * VSCode -> VS Code Signed-off-by: Nok * fix docs based on review Signed-off-by: Nok * fix link Signed-off-by: Nok --------- Signed-off-by: Nok Lam Chan Signed-off-by: Nok --- RELEASE.md | 2 +- docs/source/course/index.md | 2 +- docs/source/development/debugging.md | 2 +- docs/source/development/set_up_vscode.md | 8 ++++++-- docs/source/get_started/install.md | 4 ++++ docs/source/notebooks_and_ipython/kedro_and_notebooks.md | 2 +- 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 512edb019d..067bf85a07 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -92,7 +92,7 @@ Many thanks to the following Kedroids for contributing PRs to this release: ## Major features and improvements * Create the debugging line magic `%load_node` for Jupyter Notebook and Jupyter Lab. * Add official support for Python 3.12. -* Add better IPython, VSCode Notebook support for `%load_node` and minimal support for Databricks. +* Add better IPython, VS Code Notebook support for `%load_node` and minimal support for Databricks. * Add full Kedro Node input syntax for `%load_node`. ## Bug fixes and other changes diff --git a/docs/source/course/index.md b/docs/source/course/index.md index 241a2afda5..6cb3b27f2c 100644 --- a/docs/source/course/index.md +++ b/docs/source/course/index.md @@ -32,7 +32,7 @@ In short, you'll learn answers to the following: * What do you need to do to create a Kedro project? * How can you refactor a Jupyter notebook to a Kedro project? * How do you package Python code as a library? -* How do you work with Kedro projects in VSCode? +* How do you work with Kedro projects in VS Code? * What are namespaces and dataset factories? * What is needed to deploy a Kedro project using container solutions like Docker and open source orchestrators like Airflow? * What are Kedro plugins? diff --git a/docs/source/development/debugging.md b/docs/source/development/debugging.md index f55a75bf00..3e09b0befd 100644 --- a/docs/source/development/debugging.md +++ b/docs/source/development/debugging.md @@ -5,6 +5,6 @@ Our debugging documentation has moved. Please see our existing guides: ``` * [Debugging a Kedro project within a notebook or IPython shell](../notebooks_and_ipython/kedro_and_notebooks.md#debugging-a-kedro-project-within-a-notebook) for information on how to debug using the `%load_node` line magic and an interactive debugger. -* [Debugging in VSCode](./set_up_vscode.md#debugging) for information on how to set up VSCode's built-in debugger. +* [Debugging in VS Code](./set_up_vscode.md#debugging) for information on how to set up VS Code's built-in debugger. * [Debugging in PyCharm](./set_up_pycharm.md#debugging) for information on using PyCharm's debugging tool. * [Debugging in the CLI with Kedro Hooks](../hooks/common_use_cases.md#use-hooks-to-debug-your-pipeline) for information on how to automatically launch an interactive debugger in the CLI when an error occurs in your pipeline run. diff --git a/docs/source/development/set_up_vscode.md b/docs/source/development/set_up_vscode.md index cd0b062a98..0c94404e35 100644 --- a/docs/source/development/set_up_vscode.md +++ b/docs/source/development/set_up_vscode.md @@ -10,6 +10,10 @@ At this stage, you should be able to see the `conda` environment that you have c ![](../meta/images/vscode_setup_interpreter.png) +## Kedro VS Code Extension +[Kedro VS Code extension](https://marketplace.visualstudio.com/items?itemName=kedro.Kedro) supports Kedro 0.19+. It helps you navigate around your Kedro project by finding the definition of your datasets, find references to them in your code, and more. + +![Kedro VS Code gif](https://github.com/kedro-org/vscode-kedro/blob/main/assets/lsp-go-to-definition.gif?raw=true) ## Advanced: For those using `venv` / `virtualenv` We're going to show you how to get your virtual environments to show up in your Python interpreter in VS Code. You do this by opening [`settings.json`](https://code.visualstudio.com/docs/getstarted/settings#_settings-file-locations) and adding the following: @@ -107,7 +111,7 @@ PYTHONPATH=/path/to/project/src:$PYTHONPATH PYTHONPATH=C:/path/to/project/src;%PYTHONPATH% ``` -You can find [more information about setting up environmental variables in the VSCode documentation](https://code.visualstudio.com/docs/python/environments#_environment-variable-definitions-file). +You can find [more information about setting up environmental variables in the VS Code documentation](https://code.visualstudio.com/docs/python/environments#_environment-variable-definitions-file). Click on the **Run and Debug** icon on the left activity bar (press `Cmd + Shift + D` for macOS). If there is no existing configuration, click on **create a launch.json file** else click on the dropdown arrow in the top-left (shown below) and click **Add Configuration** . ![](../meta/images/vscode_add_configuration.png) @@ -249,7 +253,7 @@ You must [set a breakpoint in VS Code as described in the debugging section abov ## Configuring the Kedro catalog validation schema -You can enable the Kedro catalog validation schema in your VSCode IDE to enable real-time validation, autocompletion and see information about the different fields in your `catalog` as you write it. To enable this, make sure you have the [YAML plugin](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) installed. +You can enable the Kedro catalog validation schema in your VS Code to enable real-time validation, autocompletion and see information about the different fields in your `catalog` as you write it. To enable this, make sure you have the [YAML plugin](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) installed. Enter the following in your `settings.json` file: diff --git a/docs/source/get_started/install.md b/docs/source/get_started/install.md index bcd3fbdc23..d61d084a89 100644 --- a/docs/source/get_started/install.md +++ b/docs/source/get_started/install.md @@ -80,7 +80,11 @@ To exit `kedro-environment`: ```bash conda deactivate ``` +### Optional: Integrate Kedro in VS Code with the official extension +Working in an IDE can be a great productivity boost. +For VS Code Users: Checkout [Set up Visual Studio Code](../development/set_up_vscode.md) and [Kedro VS Code Extension](../development/set_up_vscode.md#kedro-vs-code-extension) +For PyCharm Users: Checkout [Set up PyCharm](../development/set_up_pycharm.md) ## How to install Kedro using `pip` diff --git a/docs/source/notebooks_and_ipython/kedro_and_notebooks.md b/docs/source/notebooks_and_ipython/kedro_and_notebooks.md index 82a0111b9a..f4d22642f3 100644 --- a/docs/source/notebooks_and_ipython/kedro_and_notebooks.md +++ b/docs/source/notebooks_and_ipython/kedro_and_notebooks.md @@ -279,7 +279,7 @@ For more details, run `%reload_kedro?`. ### `%load_node` line magic ``` {note} -This is still an experimental feature and is currently only available for Jupyter Notebook (>7.0), Jupyter Lab, IPython, and VSCode Notebook. If you encounter unexpected behaviour or would like to suggest feature enhancements, add it under [this github issue](https://github.com/kedro-org/kedro/issues/3580). +This is still an experimental feature and is currently only available for Jupyter Notebook (>7.0), Jupyter Lab, IPython, and VS Code Notebook. If you encounter unexpected behaviour or would like to suggest feature enhancements, add it under [this github issue](https://github.com/kedro-org/kedro/issues/3580). ``` You can load the contents of a node in your project into a series of cells using the `%load_node` line magic. To use `%load_node`, the node you want to load needs to fulfil two requirements: - The node needs to have a name