Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 1.56 KB

README.md

File metadata and controls

25 lines (18 loc) · 1.56 KB

Python Template

This is my template for new Python projects in VSCode. VSCode devcontainers are used for local development. Poetry is used for Python dependency management.

Instructions

  1. Install Docker
  2. Install VSCode
  3. Install the VSCode Dev Containers Extension
  4. Copy this directory to the desired location and rename it as appropriate
  5. Remove the .git directory. Use git init to start a new repo
  6. Open the directory in VSCode
  7. When prompted, choose "Reopen in Container". Alternatively choose Dev Containers: Rebuild and Reopen in Container from the command palette
  8. If this is a brand new project, a terminal will appear with prompts to initialize Poetry
  9. Develop some software!

Notes

The Python environment will automatically be activated within the VSCode integrated terminal. If for some reason that doesn't work, closing the terminal and opening a new one should fix it.

The Ruff extension will automatically lint Python files. Feel free to change this if you don't like it.

The Jupyter extension is installed, and notebooks will work out of the box. Just make sure to select .venv/bin/python as the kernel.