diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8920355..9fde2d4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,3 +1,5 @@ { - "workspaceFolder": "/mnt" + "dockerComposeFile": "../docker-compose.yml", + "service": "mypython", + "workspaceFolder": "/mnt" } diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..3a3b112 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,15 @@ +{ + "recommendations": [ + "mhutchie.git-graph", + "ms-ceintl.vscode-language-pack-ja", + "ms-python.black-formatter", + "ms-python.autopep8", + "ms-python.flake8", + "ms-python.pylint", + "ms-python.python", + "ms-python.vscode-pylance", + "njpwerner.autodocstring", + "visualstudioexptteam.vscodeintellicode-completions", + "visualstudioexptteam.vscodeintellicode", + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..8001e81 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,26 @@ +{ + "editor.rulers": [ + 80, + ], + "editor.renderWhitespace": "boundary", + "editor.tabSize": 4, + "editor.formatOnSave": true, + "editor.formatOnPaste": true, + "editor.formatOnType": true, + // + "files.autoSave": "onFocusChange", + "files.insertFinalNewline": true, + "files.trimFinalNewlines": true, + "files.trimTrailingWhitespace": true, + // + "python.defaultInterpreterPath": "/usr/local/bin/python", + "[python]": { + // "editor.defaultFormatter": "ms-python.black-formatter", + // "editor.defaultFoldingRangeProvider": "ms-python.python", + "editor.defaultFormatter": "ms-python.autopep8", + "editor.formatOnType": true, + "editor.codeActionsOnSave": { + "source.organizeImports": "never" + } + }, +} diff --git a/README.md b/README.md index 7090df0..ec8a990 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ docker compose build docker compose up -d ``` -and access to http://localhost:8888 +and access to To stop the container, diff --git a/docker-compose.yml b/docker-compose.yml index 1b5f43c..952eb24 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3" - services: mypython: build: ./ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..e4fcf12 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,17 @@ +[tool.autopep8] +# https://github.com/hhatto/autopep8#configuration +# https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes +max_line_length = 120 +ignore = "E5,E4" +# E4 Import +# E5 Line length +aggressive = 2 + +[tool.black] +# https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-format +line-length = 120 + +[tool.yapf] +# https://github.com/google/yapf#excluding-files-from-formatting-yapfignore-or-pyproject-toml +based_on_style = "pep8" +column_limit = 120 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..00b7c4f --- /dev/null +++ b/setup.cfg @@ -0,0 +1,40 @@ +[pycodestyle] +; https://pycodestyle.pycqa.org/en/latest/intro.html#configuration +max-line-length = 120 + +[pydocstyle] +; https://www.pydocstyle.org/en/stable/error_codes.html +; D100 -- D107 missing docstring +ignore = + D100, + D101, + D102, + D103, + D104, + D105, + D106, + D107, + +[pylint.] +; https://pylint.readthedocs.io/en/latest/user_guide/usage/run.html +; https://github.com/pylint-dev/pylint/blob/main/pylintrc +disable = + missing-module-docstring, + missing-class-docstring, + missing-function-docstring, +max-line-length = 120 + +[flake8] +; https://flake8.pycqa.org/en/6.0.0/user/configuration.html +; flake8 follows https://www.pydocstyle.org/en/stable/error_codes.html +; D100 -- D107 missing docstring +ignore = + D100, + D101, + D102, + D103, + D104, + D105, + D106, + D107, +max-line-length = 120