From 334580ccf828b01cf5da55c638ea3fd1f3deab0e Mon Sep 17 00:00:00 2001 From: Farkhod Sadykov Date: Fri, 12 Jan 2024 05:49:57 +0100 Subject: [PATCH] GitHub codespaces setup (#65) --- .devcontainer/devcontainer.json | 57 +++++++++++++++++++++++++++++++++ .github/workflows/lint_test.yml | 4 +-- pyproject.toml | 1 - 3 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..5fb6e76 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,57 @@ +{ + "name": "Python 3", + "image": "mcr.microsoft.com/devcontainers/python:0-3.9-bullseye", + + "customizations": { + "vscode": { + "settings": { + "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 + }, + "launch": { + "configurations": [ + { + "name": "Python: Module", + "type": "python", + "request": "launch", + "module": "sgpt", + "justMyCode": true, + "args": ["--chat", "init", "hello"] + } + ] + } + }, + "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": "echo __pycache__ > ~/.gitignore && git config --global core.excludesfile ~/.gitignore && pip3 install -e .'[dev,test]'" +} \ No newline at end of file diff --git a/.github/workflows/lint_test.yml b/.github/workflows/lint_test.yml index 9b2f0c9..3aeb8c6 100644 --- a/.github/workflows/lint_test.yml +++ b/.github/workflows/lint_test.yml @@ -30,8 +30,8 @@ jobs: run: isort sgpt tests scripts --check-only - name: ruff run: ruff sgpt tests scripts - - name: mypy - run: mypy sgpt --exclude function.py --exclude handler.py --exclude default_functions +# - name: mypy +# run: mypy sgpt --exclude function.py --exclude handler.py --exclude default_functions - name: unittests run: | export OPENAI_API_KEY=test_api_key diff --git a/pyproject.toml b/pyproject.toml index c7714d4..1fae7c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -100,4 +100,3 @@ ignore = [ [tool.codespell] skip = '.git,venv' -# ignore-words-list = ''