Setting Up VSCode for Python
This is an opinionated guide on setting up Visual Studio Code for Python development. VSCode has a lot to offer for python development, namely due to its support for Jupyter Notebooks and GitHub Copilot.
Install Visual Studio Code
If you have not already installed Visual Studio Code, you can download it from the official website.
Recommended VSCode Extensions
The following are some of the must-have extensions for Python development in VSCode:
- Python: This is the official Python extension for Visual Studio Code. It provides features such as IntelliSense and more.
- Ruff: Ruff https://docs.astral.sh/ruff/ is a code formatter for Python that integrates with VSCode. You can configure it to automatically format python files upon saving - this helps maintain a consistent python coding style across multiple users.
- Jupyter: This extension provides support for Jupyter Notebooks in Visual Studio Code. It allows you to create, edit, run, and debug Jupyter notebooks directly within VSCode.
- Data Wrangler: This extension provides a set of tools for data manipulation and exploration in Visual Studio Code. It includes features like data preview, data transformation, data visualization, and more.
- GitHub Copilot: I found this useful when trying to write code snippets or get the syntax right. It is also good for writing automated tests.