crazy4pi314 / scipy-vscode-tutorial

Repo for the 2023 SciPy conference Tutorial session on VS Code for dev workflows

Home Page:https://aka.ms/scipy2023

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Meet your coding best friend: VS Code💖

Raccon mascot bit in a header image working on a laptop with the title: Meet your coding best friend: VS Code💖

A hands-on tutorial on how to get the most out of the world’s most popular Python editor

Tutorial for SciPy 2023, 2023-07-10, 13:30–17:30 (America/Chicago), Classroom 105.

Open in GitHub Codespaces Jupyter Book Badge

Visual Studio Code (VS Code) is a free code editor that runs on Windows, Linux, macOS and in your browser. This tutorial aims at Python programmers of all levels who are already using VS Code or are interested in doing so, and will take them from zero (installing VS Code) to a production setup for Python development. We will cover starter topics, such as customizing the UI and extensions, using code autocomplete, code navigation, debugging, and Jupyter Notebooks. We will also go into advanced use cases, such as remote development, pair programming via Live Share, Dev containers, GitHub Codespaces & more.

Checkout the repo discussions for polls, Q&A, and showing off your awesome work!

Tutorial schedule

We end each section with a recap to go over everything we’ve covered and an opportunity to ask questions.

Time Duration Topic
13:30 50 min The basics of Python development in VS Code
14:20 10 min Break
14:30 50 min Scientific Python development tips and tricks
15:20 10 min Break
15:30 50 min Interacting with remote resources
16:20 10 min Break
16:30 50 min Working together, but make it fast
17:20 10 min Closing remarks

Setup Instructions

Option 1: Work on your computer

  1. Install VS Code
  2. Install local development environment
  1. Clone this repository: git clone https://github.com/crazy4pi314/scipy-vscode-tutorial
  2. Open the repository in VS Code code scipy-vscode-tutorial
  3. (Docker only) With your repo open in VS Code, install the Development Container extension (if you don't already have it) which will give you command pallet options to re-open the repo in a dev container.

You should now have the repository open in your local VS Code instance.

Option 2: Start instantly in your browser with GitHub Codespaces

  1. Create a free GitHub account if you don't have one already

  2. On the landing page of this repository, click on the green Code button, and then on the Codespaces tab to create a codespace.

After a short while you should have a VS Code window in your browser with the repository open.

This option gives you a fully functional VS Code environment (with some limitations), and should work on laptops and tablets alike.

Note: GitHub codespaces come with 120 core-hours and 15 GB-months for free for all GitHub accounts (180 core-hours for verified student accounts). By default, the container running your codespace will have 2 CPU cores, 4 GB of RAM, and 32 GB of local storage.

Option 3: Follow along on vscode.dev

If neither option 1 nor 2 works for you, you can still shadow the presenters in a read-only LiveShare session in your web browser. Contrary to option 2 this does not require a GitHub account - all you need is a web browser.

We will share a https://vscode.dev/liveshare link at the start of the session. When opening the link, select "Continue on web" and "Continue as anonymous".

Structure of this repository

This repository contains a Dev Container setup that provides conda and mamba for setting up Python environments. This repo contains a sample Conda environment file (environment.yml), demo Jupyter notebook, and Dev Container configuration files that describe how a containerized development can be built for the repo. These configuration files work for both local Dev Containers as well as Codespaces, a GitHub-hosted cloud environment.

The Docker setup for the Dev Container starts with a miniconda image that then will install whatever conda environment file you have at the root of the repo. There are some additional configuration options in the comments of the Docker and devcontainer.json that have some examples of other steps you may want to add to your Dev Container, like what VS Code extensions to install when the container is launched.

References

  • bees.csv: Diller, S.N., Schaeffer, J.S., Grundel, R., Pavlovic, N.B., McKenna, J.E. Jr., Esselman, P.C., 2020, Bee-Gap: Ecology, Life-History, and Distribution of Bee Species in the United States 2017: U.S. Geological Survey data release, https://doi.org/10.5066/P9QHQNNS.

Contributors

About

Repo for the 2023 SciPy conference Tutorial session on VS Code for dev workflows

https://aka.ms/scipy2023

License:MIT License


Languages

Language:TeX 73.8%Language:Jupyter Notebook 17.9%Language:Dockerfile 6.7%Language:Python 1.5%