mirror of
https://code.lenaisten.de/Lenaisten/advent22.git
synced 2024-12-23 13:13:00 +00:00
api: update project scaffolding
This commit is contained in:
parent
87856b06db
commit
fe90960e6a
3 changed files with 19 additions and 13 deletions
|
@ -1,11 +1,20 @@
|
|||
# See here for image contents: https://github.com/devcontainers/images/blob/main/src/python/.devcontainer/Dockerfile
|
||||
|
||||
# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon):
|
||||
# - 3, 3.11, 3.10, 3.9, 3.8, 3.7, 3.6
|
||||
# - 3-bullseye, 3.11-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye
|
||||
# - 3-buster, 3.11-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster
|
||||
ARG VARIANT="3.11-bullseye"
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
|
||||
# [Choice] Python version (use -bookworm or -bullseye variants on local arm64/Apple Silicon):
|
||||
# - 3, 3.12, 3.11, 3.10, 3.9, 3.8
|
||||
# - 3-bookworm, 3.12-bookworm, 3.11-bookworm, 3.10-bookworm, 3.9-bookworm, 3.8-bookworm
|
||||
# - 3-bullseye, 3.12-bullseye, 3.11-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye
|
||||
# - 3-buster, 3.12-buster, 3.11-buster, 3.10-buster, 3.9-buster, 3.8-buster
|
||||
ARG VARIANT="3.12-bookworm"
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/python:1-${VARIANT}
|
||||
|
||||
# Add "Poetry": https://python-poetry.org
|
||||
ARG POETRY_HOME="/usr/local"
|
||||
ENV POETRY_HOME="${POETRY_HOME}"
|
||||
RUN set -ex; \
|
||||
\
|
||||
curl -sSL https://install.python-poetry.org | python3 -; \
|
||||
poetry self add poetry-plugin-up;
|
||||
|
||||
# [Choice] Node.js version: none, lts/*, 18, 16, 14, 12, 10
|
||||
ARG NODE_VERSION="none"
|
||||
|
@ -34,5 +43,3 @@ RUN set -ex; \
|
|||
|
||||
# [Optional] Uncomment this line to install global node packages.
|
||||
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|
||||
|
||||
RUN su vscode -c "curl -sSL https://install.python-poetry.org | python3 -" 2>&1
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// Update 'VARIANT' to pick a Python version.
|
||||
// Append -bullseye or -buster to pin to an OS version.
|
||||
// Use -bullseye variants on local on arm64/Apple Silicon.
|
||||
// "VARIANT": "3.11-bullseye",
|
||||
"VARIANT": "3.11-bookworm",
|
||||
// Options
|
||||
"NODE_VERSION": "none"
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
|||
"mhutchie.git-graph",
|
||||
"ms-python.python",
|
||||
"ms-python.black-formatter",
|
||||
// "ms-python.flake8",
|
||||
"ms-python.flake8",
|
||||
"ms-python.isort",
|
||||
"ms-python.vscode-pylance"
|
||||
]
|
||||
|
|
5
api/.vscode/settings.json
vendored
5
api/.vscode/settings.json
vendored
|
@ -1,7 +1,4 @@
|
|||
{
|
||||
"python.linting.enabled": true,
|
||||
"python.linting.pylintEnabled": false,
|
||||
"python.linting.flake8Enabled": true,
|
||||
"python.languageServer": "Pylance",
|
||||
"editor.formatOnSave": true,
|
||||
"[python]": {
|
||||
|
@ -18,4 +15,6 @@
|
|||
],
|
||||
"python.testing.unittestEnabled": false,
|
||||
"python.testing.pytestEnabled": true,
|
||||
"black-formatter.importStrategy": "fromEnvironment",
|
||||
"flake8.importStrategy": "fromEnvironment",
|
||||
}
|
Loading…
Reference in a new issue