Skip to content

Commit

Permalink
chore: add dev container
Browse files Browse the repository at this point in the history
  • Loading branch information
sgomez committed Oct 27, 2024
1 parent b58ab50 commit b185594
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 26 deletions.
44 changes: 44 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/jsburckhardt/devcontainer-features/uv:1": {},
"ghcr.io/jsburckhardt/devcontainer-features/ruff:1": {}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "uv sync --all-extras --dev",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": ["charliermarsh.ruff", "ms-python.python", "ms-python.debugpy", "matangover.mypy", "ms-python.vscode-pylance"],
"settings": {
"ruff.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll": "always",
"source.organizeImports": "explicit"
},
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
},
"editor.formatOnSave": true,
"python.testing.pytestArgs": ["tests"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python"
}
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11
3.12
3 changes: 0 additions & 3 deletions .vscode/extensions.json

This file was deleted.

14 changes: 0 additions & 14 deletions .vscode/settings.json

This file was deleted.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "kata"
version = "0.1.0"
description = "Code Kata Python Template"
readme = "README.md"
requires-python = ">=3.11"
requires-python = ">=3.12"
dependencies = []

[build-system]
Expand All @@ -18,7 +18,7 @@ dev = [
]

[tool.mypy]
python_version = "3.11"
python_version = "3.12"
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
Expand Down
7 changes: 1 addition & 6 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b185594

Please sign in to comment.