|
| 1 | +{ |
| 2 | + "name": "docprocessor Library Development", |
| 3 | + "image": "mcr.microsoft.com/devcontainers/python:3.11", |
| 4 | + |
| 5 | + "features": { |
| 6 | + "ghcr.io/devcontainers/features/python:1": { |
| 7 | + "version": "3.11" |
| 8 | + } |
| 9 | + }, |
| 10 | + |
| 11 | + "postCreateCommand": "chmod +x .devcontainer/setup.sh && .devcontainer/setup.sh", |
| 12 | + |
| 13 | + "containerEnv": { |
| 14 | + "PYTHONPATH": "${containerWorkspaceFolder}" |
| 15 | + }, |
| 16 | + |
| 17 | + "customizations": { |
| 18 | + "vscode": { |
| 19 | + "extensions": [ |
| 20 | + "ms-python.python", |
| 21 | + "ms-python.black-formatter", |
| 22 | + "ms-python.isort", |
| 23 | + "ms-python.flake8", |
| 24 | + "eamodio.gitlens", |
| 25 | + "mhutchie.git-graph", |
| 26 | + "davidanson.vscode-markdownlint", |
| 27 | + "redhat.vscode-yaml" |
| 28 | + ], |
| 29 | + |
| 30 | + "settings": { |
| 31 | + // Python interpreter |
| 32 | + "python.defaultInterpreterPath": "/usr/local/python/current/bin/python", |
| 33 | + |
| 34 | + // Type checking |
| 35 | + "python.analysis.typeCheckingMode": "basic", |
| 36 | + |
| 37 | + // Testing setup |
| 38 | + "python.testing.pytestEnabled": true, |
| 39 | + "python.testing.unittestEnabled": false, |
| 40 | + "python.testing.pytestArgs": ["tests"], |
| 41 | + "python.testing.cwd": "${containerWorkspaceFolder}", |
| 42 | + |
| 43 | + // Code formatting on save |
| 44 | + "editor.formatOnSave": true, |
| 45 | + "editor.codeActionsOnSave": { |
| 46 | + "source.organizeImports": "always" |
| 47 | + }, |
| 48 | + |
| 49 | + "[python]": { |
| 50 | + "editor.defaultFormatter": "ms-python.black-formatter", |
| 51 | + "editor.formatOnSave": true |
| 52 | + }, |
| 53 | + |
| 54 | + // Black formatter |
| 55 | + "black-formatter.args": ["--line-length", "100"], |
| 56 | + |
| 57 | + // isort |
| 58 | + "isort.args": ["--profile", "black", "--line-length", "100"], |
| 59 | + |
| 60 | + // flake8 |
| 61 | + "flake8.args": [ |
| 62 | + "--max-line-length=100", |
| 63 | + "--extend-ignore=E203,W503" |
| 64 | + ] |
| 65 | + } |
| 66 | + } |
| 67 | + }, |
| 68 | + |
| 69 | + "remoteEnv": { |
| 70 | + "PYTHONPATH": "${containerWorkspaceFolder}" |
| 71 | + } |
| 72 | +} |
0 commit comments