Skip to content

Commit

Permalink
Merge pull request #15 from sushi-chaaaan/tool/dev-container
Browse files Browse the repository at this point in the history
build: add dev container config
  • Loading branch information
sushichan044 authored Oct 10, 2023
2 parents 24920d6 + 1ab0e07 commit 7d1d9e3
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// 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 Container with Poetry",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.10-bullseye",
"features": {
"ghcr.io/devcontainers-contrib/features/poetry:2": {}
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// 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": "poetry config virtualenvs.in-project true && poetry install --no-root && poetry run pre-commit install",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"ms-python.black-formatter",
"ms-python.mypy-type-checker",
"charliermarsh.ruff",
"ms-toolsai.vscode-jupyter-powertoys",
"mosapride.zenkaku",
"shardulm94.trailing-spaces",
"christian-kohler.path-intellisense",
"VisualStudioExptTeam.vscodeintellicode",
"VisualStudioExptTeam.intellicode-api-usage-examples",
"oderwat.indent-rainbow",
"tamasfe.even-better-toml",
"ms-azuretools.vscode-docker"
],
"settings": {
"python.defaultInterpreterPath": "./.venv/bin/python",
"python.terminal.activateEnvInCurrentTerminal": true,
"python.terminal.activateEnvironment": true
}
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ repos:
- id: end-of-file-fixer
- id: pretty-format-json
args: [--autofix, --indent, "2", "--no-sort-keys"]
exclude: devcontainer.json

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
Expand Down

0 comments on commit 7d1d9e3

Please sign in to comment.