Skip to content

Commit

Permalink
update for 2024
Browse files Browse the repository at this point in the history
- remove version from docker-compse.yml
- add devcontainer.json
- add settings.json, extensions.json
- add pyproject.toml/setup.cfg
- fix url in README
  • Loading branch information
tttamaki committed May 10, 2024
1 parent 54098ca commit db274fc
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"workspaceFolder": "/mnt"
"dockerComposeFile": "../docker-compose.yml",
"service": "mypython",
"workspaceFolder": "/mnt"
}
15 changes: 15 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -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",
]
}
26 changes: 26 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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"
}
},
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ docker compose build
docker compose up -d
```

and access to http://localhost:8888
and access to <http://localhost:8888>

To stop the container,

Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3"

services:
mypython:
build: ./
Expand Down
17 changes: 17 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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
40 changes: 40 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit db274fc

Please sign in to comment.