Add devcontainer with Python 3.13 and uv support
Adds a Dockerfile-based development container using Microsoft's Python 3.13 image, with uv installed for dependency management. Updates: - Adds .devcontainer/Dockerfile based on Python 3.13 - Modifies devcontainer.json to use a local build - Updates on-create-command.sh to install dependencies using uv
This commit is contained in:
parent
284273e3c5
commit
9392f5b3e9
3 changed files with 23 additions and 4 deletions
9
.devcontainer/Dockerfile
Normal file
9
.devcontainer/Dockerfile
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Base image: Match with .readthedocs.yaml and pyproject.toml
|
||||
FROM mcr.microsoft.com/devcontainers/python:3.13
|
||||
|
||||
# Install uv and pre-commit globally
|
||||
RUN pip install --upgrade pip setuptools wheel uv pre-commit
|
||||
|
||||
# Set workdir and default shell
|
||||
WORKDIR /workspaces/flask
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"name": "pallets/flask",
|
||||
"image": "mcr.microsoft.com/devcontainers/python:3",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile"
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,15 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Create a virtual environment and upgrade pip/setuptools/wheel
|
||||
python3 -m venv --upgrade-deps .venv
|
||||
. .venv/bin/activate
|
||||
pip install -r requirements/dev.txt
|
||||
pip install -e .
|
||||
pre-commit install --install-hooks
|
||||
|
||||
# uv is already available (installed via Dockerfile). Use uv to install:
|
||||
# 1) the project in editable mode
|
||||
# 2) all dev dependencies (from pyproject.toml [project.optional-dependencies])
|
||||
uv pip install --editable . --group dev
|
||||
|
||||
|
||||
# Set up pre-commit hooks
|
||||
pre-commit install
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue