Skip to content

Commit

Permalink
add vscode mentions (#3898)
Browse files Browse the repository at this point in the history
* add vscode mentions

Signed-off-by: Nok Lam Chan <[email protected]>

* add gif

Signed-off-by: Nok <[email protected]>

* VSCode -> VS Code

Signed-off-by: Nok <[email protected]>

* fix docs based on review

Signed-off-by: Nok <[email protected]>

* fix link

Signed-off-by: Nok <[email protected]>

---------

Signed-off-by: Nok Lam Chan <[email protected]>
Signed-off-by: Nok <[email protected]>
  • Loading branch information
noklam committed Jul 8, 2024
1 parent a179f87 commit ab2e479
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/source/course/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
2 changes: 1 addition & 1 deletion docs/source/development/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
8 changes: 6 additions & 2 deletions docs/source/development/set_up_vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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:

Expand Down
4 changes: 4 additions & 0 deletions docs/source/get_started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
2 changes: 1 addition & 1 deletion docs/source/notebooks_and_ipython/kedro_and_notebooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab2e479

Please sign in to comment.