From 70c31cb25e6cfda26b75d6a6183d60f4e9708baa Mon Sep 17 00:00:00 2001 From: Farkhod Sadykov Date: Fri, 12 Jan 2024 04:23:30 +0100 Subject: [PATCH] Codespace dev container --- .devcontainer/devcontainer.json | 46 +++++++++++++++++++++++++++++++++ .vscode/launch.json | 17 ------------ .vscode/settings.json | 23 ----------------- pyproject.toml | 1 - 4 files changed, 46 insertions(+), 41 deletions(-) create mode 100644 .devcontainer/devcontainer.json delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/settings.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..0a46442a --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,46 @@ +{ + "name": "Python 3", + "image": "mcr.microsoft.com/devcontainers/python:0-3.9-bullseye", + + "customizations": { + "vscode": { + "settings": { + "python.linting.enabled": true, + "python.defaultInterpreterPath": "/usr/local/bin/python", + "cSpell.words": [ + "OPENAI", + "secho", + "sgpt", + "Typer" + ], + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff" + }, + "files.exclude": { + "**/.git/**": true, + "**/.mypy_cache/**": true, + "**/__pycache__/**": true + }, + "files.watcherExclude": { + "**/.git/**": true, + "**/.mypy_cache/**": true, + "**/.venv/**": true, + "**/__pycache__/**": true + } + }, + "extensions": [ + "GitHub.copilot", + "charliermarsh.ruff", + "ms-python.python", + "ms-python.vscode-pylance", + "ms-python.black-formatter", + "ms-python.isort", + "ms-python.mypy-type-checker", + "ms-python.pylint" + ] + } + }, + + "remoteUser": "vscode", + "postCreateCommand": "pip3 install -e .'[dev,test]'" +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index edb998f3..00000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - // Make sure you have your OPENAI_API_KEY https://github.com/settings/codespaces - "version": "0.2.0", - "configurations": [ - { - "name": "Python: Module", - "type": "python", - "request": "launch", - "module": "sgpt", - "justMyCode": true, - "args": ["--chat", "init", "hello"], - } - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index e3d2e0f4..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "cSpell.words": [ - "OPENAI", - "secho", - "sgpt", - "Typer" - ], - "python.linting.pylintArgs": [ - "--disable=too-many-locals", - "--disable=missing-function-docstring", - "--disable=too-many-arguments", - "--disable=missing-module-docstring", - "--disable=import-error", - "--disable=missing-class-docstring", - "--disable=too-many-instance-attributes", - "--disable=too-many-function-args", - "--disable=unspecified-encoding", - "--max-line-length=120", - ], - "python.linting.enabled": true, - "python.linting.lintOnSave": false, - "python.linting.maxNumberOfProblems": 120, -} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c7714d4b..1fae7c08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -100,4 +100,3 @@ ignore = [ [tool.codespell] skip = '.git,venv' -# ignore-words-list = ''